Monday, September 22, 2008

GIT Repository

GIT is pretty much like a repository to faciliate sharing of work amongst developers (mostly), you need to know this if you are looking at open source development, let me introduce a few commands that may potentially be useful:

1. git clone - this clones the directory of the repository.
e.g. git://scarlet.aura.cs.cmu.edu/openisr.git

2. git push - this pushes the files from your local drive to the central repository (the default is master for the first file) If there are some errors, in regards to non-fast-foward, use the -f option.
e.g. ssh://aarontwc@scarlet.aura.cs.cmu.edu/~aarontwc/openisr.git master

http://davitenio.wordpress.com/2008/10/08/synchronize-git-repositories-between-deskop-and-laptop/

3. git add . - this command adds the existing files in the correct directory to be commited. Basically, it specifies the files to be committed into GIT.

4. git commit -m "message to commit", (instead of just typing git commit, having the -m parameter, allows you to put meaningful text messages to commit, so that its easier for you to track your changes later.

5. git show - this command allow you to see the list of commits make, when and why


6. git pull - this command pulls the latest updates to your local repository.

Kernal.org has a comprehensive guide on GIT.

No comments: