Quick and Dirty Git Tricks 1.
Git is a version control system which is pretty useful, but a little complex. If you use git, here are somethings you'll be doing frequently:
git commit -a -m "[message]"
- Commit all files changed to a branch with a message. If you don't commit your changes, you'll lose the work.
git add .
- Add all new and changed files (except git-ignored files) to your open repo; now git will watch them for changes. The
.is actually a regular expression that will match any file in any subdirectory. Does not stage file deletions.
git log -3
- Show the 3 most recent commits and their comments.