Git Aliases
Go to file
ever 69e3676126 Updated 2023-01-01 11:51:28 +01:00
README.md Updated 2023-01-01 11:51:28 +01:00
git-aliases.ini Updated 2023-01-01 11:51:28 +01:00

README.md

Collection of the git aliases I'm using

This is a useful set of aliases, which help me everytime I use git.

List of Aliases

Amending

  • amend/am - Amend last commit
  • quickfix/qf - Merge staged changes into last commit

Special but important commands

  • fp - Forcepush with lease
  • ffp - Forcepush
  • tstash - Stash without tracked changes
  • ustash - Stash but also include untracked changes

Undo

  • uncommit/uc - Undo last commit
  • unmerge/um - Undo last merge
  • unstage/us file - Unstage a file
  • untrack/ut file - Untrack a file

Other

  • unlock/ul - Delete index.lock
  • rank - Show a ranking of contributors
  • ahelp - Display this readme

List of abbreviations

  • br - branch
  • c - commit
  • cl - clone
  • d - diff
  • p - pull
  • s - status
  • sw - switch

Installation

git config --global --add include.path "$(pwd)/git-aliases.ini"

Note: Should you move the directory to which the include path points to, you will need to update it's path in your gitconfig.