The Git snippet collection contains a variety of short tips and tricks for all currently maintained versions of git. It includes most commonly-used commands and covers various use-cases in the form of simplified documentation, complete with multiple examples.
Git, Commit
Updates the last commit's contents without changing its message.
Git, Commit
Displays differences between staged or unstaged changes and the last commit.
Git, Branch
Rewinds the current branch by a given number of commits.
Git, Branch
Rewinds the current branch by a given number of commits.
Git, Commit
Undoes a specified commit without rewriting history.
Git, Commit
Undoes the last commit without rewriting history.
Git, Commit
Prints the last commit.
Git, Commit
Creates a fixup commit that can be autosquashed in the next rebase.
Git, Commit
Creates a new commit by the specified author.
Git, Commit
Creates a new commit containing the staged changes.
Git, Commit
Creates an empty commit.
Git, Commit
Adds files to the staging area.
Git, Commit
Removes files from the staging area.