Branches |
gco BRANCH
git co BRANCH |
Check out BRANCH |
gb
git br |
Alias for git branch |
gco . |
Save a snapshot commit of the working directory, then revert to the latest commit |
git snapshot |
Save a snapshot of the current changes as a stash |
gcr BRANCH |
Check out remote-tracking branch BRANCH into local branch of the same name |
git rmbranch BRANCH |
Delete BRANCH both locally and from remote |
gl |
Alias for git pull |
gp
git put |
Alias for git push |
Staging commits |
gst
git st |
Alias for git status |
gap |
Add working tree changes to the index interactively |
gnap |
Add working tree changes, including new files, to the index interactively |
git aa |
Stage all working tree changes for commit |
git ci |
Commit the current index |
gc |
Commit the current index, displaying the unified diff in the message template |
gca |
Commit all changes in the index and working tree, displaying the unified diff |
gd |
Show the diff between the working tree and the most recent commit |
gdc |
Show the diff between the index and the most recent commit |
gdh |
Show the overall diff with the most recent commit, both staged and unstaged |
History |
glp |
View the commit log with diffs |
glg
git tree |
View all commits in all branches as a tree |
git tr |
View current branch commit history as a tree |
git ln |
Show a concise, colorized commit history |
glod |
Show a concise, colorized commit history including branch names |
Rebasing |
gr |
Alias for git rebase |
git ri |
Perform an interactive rebase |
grc |
Continue a rebase after editing or fixing a commit |
gra |
Abort a rebase |
git squash COMMIT |
Commit the current changes as a squash for commit COMMIT, applied at next rebase |
git fixup COMMIT |
Commit the current changes as a fixup for commit COMMIT, applied at next rebase |
gpr |
Rebase the local branch off of the tracked remote branch |
git doff |
Roll back the last commit into the working tree |
reset-authors |
Set yourself as the author of the most recent commit |
Unsorted |
git cp |
Alias for git cherry-pick |
gcl |
Remove all untracked files from the directory |
git unpushed |
Show local commits not pushed to the remote |
git unpulled |
Show remote commits not pulled to local branch |
pruneremote |
Remove local copies of remote branches that no longer exist on the remote |