* `unamend` applies the diff from a previous `commit --amend` to the working tree to make it easy to undo an accidental amend. * Removed `last` alias, use `checkout -` instead * Rename `name` alias to `refname` to be less ambiguous
Git Configuration
Aliases
A set of Git aliases which follow the idea "say what you mean" rather than remembering the plumbing term of a specific command.
abandon
abandons all local changes leave a clean repository.unstage
unstage staged changes, shorthand forgit reset -q HEAD --
.amend
amends the last commit, shorthand forgit commit --amend
.fixup
prepare to fixup a commit, shorthand forgit commit --fixup
.squash
prepare to squash a commit, shorthand forgit commit --squash
.prepare
prepare a branch for merging into another, shorthand forgit rebase --interactive --fork-point
.list
list local branches, a shorthand forgit branch
.create
creates a new branch, shorthand forgit checkout -b
.delete
deletes an existing branch, shorthand forgit branch -D
.name
the name of the current branch.last
the name of the last branch checked out before the current branch.publish
push and set the tracking branch of a local branch to origin, shorthand forgit push -u origin <branch>
.unpublish
delete a remote branch, shorthand forgit push origin :<branch>
.force
force push local changes to the remote, shorthand forgit push --force-with-lease
.changes
compare the list of commits on the local branch to another branch, e.g. when on a feature branchgit changes master
lists the commits which are not present on the master branch.save
like pushing to the stash but attached to the current branch, shorthand forgit commit -am "temp!"
.load
like popping from the stash but attached to the current branch, ifHEAD
has the subjecttemp!
thengit reset --mixed HEAD~
is executed, otherwise the messageerror: commit subject is not: temp!
is output.
Zsh Completions
The excellent Git completions provided by Zsh which can see through aliases however some aliases involve multiple commands or rely on the shell to function. The following aliases extend the default Git completions.
git changes
completions for the branch name to compare with are provided.
Description
Languages
Shell
100%