Git Cheat Sheet
April 11, 2009 § 1 Comment
A couple of notes for myself and readers about Git:
- Git does not allow you to add empty directory.
- Do not forget to do initial commit when starting a new repository. Otherwise you will get: error: src refspec master does not match any. Reference: here.
- There are a couple of configurations need to be set before performing git pull:
git config branch.master.merge 'refs/heads/master' and
git config branch.master.remote 'origin'
- How to ignore files? Read here.
- The best Git GUI on OS X is: GitX.
- Git cheat sheet by GitHub: [link]
If you are SVN users:
- git checkout is not what you think. The functionality that you might want is git clone.
- git checkout is used to switch branch or re-checkout a file.
- git commit is not what you think. The command only do local commit. To push to ‘central‘ repo, you want to do git commit followed by git push.