Git – Open Source Version Control Solution

Git is an open source version control solution. Have rich functionalities, extendibility

Git is very easy to install and configure. As I am windows geek I just have to run a wizard to install Git.

As I said I windows geek to I love to work on GUI but I think Git is the only tool where I enjoy will working on command line. On installing Git on windows, it will install Git GUI and Git Bash. Git Bash is its shell or command prompt where you can execute Git commands

You can create public and private repositories, history, version controlling. There’s nothing particularly magical about a repository; it is simply a directory tree in your file system that Git treats as special. You can rename or delete a repository any time you like, using either the command line or your file browser. It uses SSH (Secure Shell) protocol to exchange information in public repositories. All you need to do is to create private and public key and configure it for SSH agent and your information is now on secure channel for Git transactions.

There are a lots of Git command but all are simpler. It mechanism is very simple. If you do not want to go up to advanced level, you can start with just little simple command. Its syntax, keyword and switches are very self explanatory.  Following are 13 simple commands; these are enough to work on basic level. Further branches are introduce that increase complexity

$ git help First you get a help and documentation about get on Git bash.
$ git init Initializes a git repository – creates the initial ‘.git’ directory in a new or in an existing project
$ git clone

 

To get a modified version from URL or initially it can be used to fork or get files from repository or you can create another local copy with same command.
$ git log To get view of history
$ git add Add file changes in working directory
$ git rm Removes files from your index and your working directory so they will not be tracked
$ git diff Available with many switches. Use to take different between two version of same file or different files also.
$ git commit Commit local changes to working tree. Can be used with –a to commit all changes in your local working directory.
$ git fetch Fetches all the objects from the remote repository that are not present in the local one.
$ git push Upload a tree to the original repository.
$ git pull Fetches the files from the remote repository and merges it with your local one.
$ git reset Resets your index and working directory to the state of your last commit.
$ git status Shows you the status of files in the index versus the working directory. It will list out files that are untracked (only in your working directory), modified (tracked but not yet updated in your index), and staged (added to your index and ready for committing).

 

Leave a comment