Golden Rules of Source Control

#1: Compilation output does not belong in source control.
 
#2: Add Dependencies to Source Control 
(If not using Nuget or similar)
#3: "Pull" newest version before starting work.
 
#4: "Commit" only completed code.
 
#5: "Stash" non-completed code for later (if you have too).
  • ...before checking out a different branch.
  • ...before pulling remote changes.
  • ...before merging or rebasing a branch.
 
#6: "Commit" only working code.
 
#7: "Commit" only related changes.
  • Don't commit, a fix for bug #122 and a change to your login page, in a single commit.
 
#8: Write good commit messages.(short and simple is key)
  • Don't write something like "Code updated! :)".
  • Write something like "Capitalized all titles.
 
#9: Use branches extensively
 
#10: Have fun