Introduction And Guidence To Use Git

About Git
Git is a software which handles legal and financial needs for the project. As well as it is a free
and open source version control system which is designed to handle everything of projects with
speed and efficiency. It is not a programming language but is a general tool. It is easy to learn
and has a footprint with lightening performance. It is designed for distributed development and
manage the source code. It allows a team of people to work together using the same files.

Simple Guides For Using Git

  •  Workflow

          The local repository consists of three “tress” maintained by Git. The first one is the working
          directory which holds the actual files. The second one is the index which act as a staging
          area. Finally the last one is the head which points to the last commit you have made.

  • Add and Commit

        The change can be done by using git add <filename>, git add *. This is the 1 st step in the
        git workflow. To commit these changes you can use git commit –m “commit message”,
        now the file is committed to the head, but not in remote repository.

  • Pushing changes

         The changes are now in the head of the local working copy. To send those changes to
         remote repository, execute git push origin master. If you do not have cloned an existing
         repository and want to connect your repository to a remote server, you should add it with
         git remote add origin <server>, now you are able to push your changes to the selected
         remote server.

  • Branching

           They are used to develop features isolated from each other. You can use other branches for
           development and merge them back to the master branch upon completion. To create a new
           branch named “feature_x” and switch to its using git checkout –b feature_x, switch back
           to master git checkout master, add and delete the branch again git branch –d feature_x.
           When a branch is not available to others unless you have to push the branch to your remote
           repository git push origin <branch>.

Importance of Git

  •  Multiple people can work on same field.
  • It makes easy for team to change code.
  • It performs computations and stores repository.
  •  It is a central place where everything is stored.
  • It is a branching capabilities which is cheap and easy to merge.
  •  It is use for data redundancy and replication.
  •  It is collaboration friendly.
  •  Any kind of projects can use Git.


Features of Git

  • It helps to maintain the backup of source code.
  • It helps to collaboratively work with numbers of developer.
  • It helps to deploy source code on server with one command.
  • It help to view the project history. By which you can find out the change in particular field.
  • It is faster than other version controlling systems.