Skip to content
Kenny Yu edited this page Oct 23, 2013 · 2 revisions

Here are a few tips on how to use git effectively

  1. Commit OFTEN. Having commits gives you the ability to go back to this point in history in case you ever find yourself in a buggy situation.
  2. Use descriptive commit messages. You're not going to remember what you coded last week. Having a message like "fixed test 17, but test 18 is failing" is more helpful than "commit message".
  3. Keep your commits small. Try to make all the changes in one commit be part of one single, simple, logical unit.
  4. Setup your .gitignore file to tell git to ignore certain files in your project that should not be snapshotted (e.g. auto-generated files should not be checked into git. Examples include *.o files generated by gcc, and the final compiled program).
  5. git help