Current wiki pages
New (yes, new) Git pages as of February, 2019
Every Git page below this section is a candidate for current updating – many of those pages are still just fine, but are subject to improvement in the near future.
Multi-level pages
Working on
Specific topic pages
Deprecated
- git prune (use git gc, which calls git prune)
- git whatchanged (use git log)
- git annotate (use git blame)
Additional reference info
External links
Stuff to ponder, resolve and add somewhere
- WRT next commit, what is in the index is all that matters.
git ls-files
- More people should read
man gitcli
. Seriously. git log --remove-empty
– stop when a given path disappears.git reset
will not delete files it does not track, including files it is told to ignore.git push
will not affect the remote working tree; try to avoid pushing to non-bare reposgit config --global alias.unadd “reset HEAD”
git rev-list HEAD | tail -1
to get root commit- Config variable
checkout.defaultRemote
- use
git fsck
to track down staged, then reset files (git show
) - reset a file with
git checkout -p
git rm -rf :/ && git checkout commit-ish – :/
- Danger with reverting a merge commit.
- Renaming:
git log -M
git push origin +branchname
git checkout -b maint origin/maint
- What files changed in a given commit?
git diff –name-only <commit>^!
Other stuff to add (not sure where)
- comprehensive guide to dealing with whitespace issues
- branch names and wildcarding
git cat-file -p HEAD
git ls-tree -r HEAD
git ls-files -s
- smudge and clean filters