Skip to content

Latest commit

 

History

History
26 lines (21 loc) · 858 Bytes

git_aliases.md

File metadata and controls

26 lines (21 loc) · 858 Bytes

Git aliases

Requirements

  • Make sure you have this project installed. Read the installation process
  • Enable git aliases by adding the following lines of code to ~/.gitconfig:
[include]
    path = ~/.aliases/git_aliases

Git aliases

  • git co: shortcut for checkout
  • git graph: a nice tree with all the commits and their parents
  • git hist: a compact list of commits from the current branch
  • git restore: shortcut for checkout --
  • git unstage: shortcut for reset HEAD --

Functions

Delete branches except those specified

  • delete_branches_except [args]: deletes all git branches except for those specified as arguments.

Usage example: delete_branches_except master develop