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.
git ls-filesman 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 commitcheckout.defaultRemotegit fsck to track down staged, then reset files (git show)git checkout -pgit rm -rf :/ && git checkout commit-ish – :/git log -Mgit push origin +branchnamegit checkout -b maint origin/maintgit diff –name-only <commit>^!git cat-file -p HEADgit ls-tree -r HEADgit ls-files -s