Git aliases
OmarchymacOS
Global git aliases: a log I actually read, and one word to take back the last step.
The aliases
git ls | The log, one line per commit: hash, subject, author, refs. |
|---|---|
git ld · git ldr | The same with the date, exact or relative. |
git tree | git ls as a graph. |
git last | The last commit, with the files it touched. |
git amend | Adds what is staged to the last commit, keeping its message. |
git undo | Takes the last commit back and keeps its changes. |
git publish | Pushes the branch and sets its upstream. |
git unpublish | Deletes the branch on the remote. |
git aliases | Lists every alias. |
git ln <name> <command> | Defines a new global alias. |
How it gets there
A script sets them with git config --global, so they live in ~/.gitconfig and work in any shell and any editor.