There are no chapter one notes.
.gitignore can have rules:
# a comment - this is ignored
*.a # no .a files
!lib.a # but do track lib.a, even though you're ignoring .a files above
/TODO # only ignore the root TODO file, not subdir/TODO
build/ # ignore all files in the build/ directory
doc/*.txt # ignore doc/notes.txt, but not doc/server/arch.txt
git diff shows changes not yet staged
git diff --cached or --staged shows staged but not committed
git commit -a -m 'comment'
git rm stages deleted files, removes from tracking & working directory (might need -f is you already modified and staged?)
git log shows commit history; add -p to show diff; -2 shows last 2
there are many formatting options for logging: git log --pretty=oneline
git reset HEAD -- filename unstages filename. Still modified (resets the index to what it was)
git checkout -- filename undoes modifications back to last commit; forever, no redo
git remote lists; -v shows url
git remote add alias url
git fetch pulls changes from remote; then you merge
git pull fetches a branch, pulls into current branch you are in
git clone adds remote repository as 'origin'. sets up a 'local master' to track 'remote master'
git push [remote-name] [branch-name]: when you want to share; only works if nobody has pushed in the meantime; otherwise pull first
remotes can be removed and renamed:
git remote rename pb paul
git remote rm paul
git tag shows all tags
git show shows annotated tag
git tag -l 'search term'
git tag -a 'tag' -m 'annotation'
git push origin [tagname] tags need to be explicitly pushed
git push --tags pushes all tags