Reference GIT

git clone clone a repository into a new directory
git commit -a to commit your changes locally to your computer
git push this is used to push all committed changes to the server
git checkout Checkout a branch or paths to the working tree
git status [-v] status [verbose]
git ls-files List all the files in the git repo dir
git pull bring local copy up to date with the server copy
git diff version1 version 2 see your changes
git log [-v] see the log file [with changed files]
git add/rm <file> add or remove files
git info prints info about the current svn dir
git help help
git merge <branch> merges branch into master

2 Responses

Subscribe to comments with RSS.

  • rodica gall says:

    i want to see the difference between the present file version and 5 versions back of the same file

    • zaphinath says:

      Just do a ‘git diff HEAD@{1} filename’ where {1} = {}. You can get the hash by typing ‘git log’ and going back as many commits as you need. Of course filename just refers the the file you want to see.

Leave a Reply

Your email address will not be published. Required fields are marked *