-
Notifications
You must be signed in to change notification settings - Fork 323
Useful Git Aliases
This is a list of useful git aliases, and the commands to define them in git.
Just abbreviates status to st. Similar things can be defined like ci can be commit, and co can be checkout.
git config --global alias.st status
usage: git st
Prints a graph based log of a branch (or all branches if the --all flag is appended) on the command line. Similar to gitk.
git config --global alias.logg "log --graph --oneline --abbrev-commit --decorate"
usage: git logg
Exports a branch from your local repository into a directory.
git config --global alias.export "!sh -c 'git archive ${1} | tar xv -C ${2}' -"
usage: git export branch_name export_directory
Updates remote tracking branches, and deletes remote tracking branches for branches that have been deleted.
git config --global alias.up "fetch --all -p"
usage: git up