Skip to content

Latest commit

 

History

History
49 lines (41 loc) · 830 Bytes

Git.md

File metadata and controls

49 lines (41 loc) · 830 Bytes

Git

gst

Show status of current branch

alias gst="git status"

gcmsg

Create a commit with a message

alias gcmsg="git commit --message"

gcb

Create a new branch

alias gcb="git checkout -b"

gco

Checkout a branch

alias gco="git checkout"

gapa

Stage changes in patch mode. Allows for selecting changes to stage by hunk.

alias gapa="git add --patch"

gcp

Cherry-pick a commit

alias gcp="git cherry-pick"

gfix

Amend commit (e.g. gfix fc54ac3 will create a fixup for the commit fc54ac3)

alias gfix="git commit --fixup"

gash

Auto-squash fixes (e.g. gash master will rebase the current branch on master and autosquash all the fixups made with gfix)

alias gash="git rebase --autosquash --interactive"