Skip to content

Instantly share code, notes, and snippets.

@Kelley-Stephens
Created December 12, 2017 15:09
Show Gist options
  • Save Kelley-Stephens/4bb3a8e5107962a1ff8d163aed0663ed to your computer and use it in GitHub Desktop.
Save Kelley-Stephens/4bb3a8e5107962a1ff8d163aed0663ed to your computer and use it in GitHub Desktop.
.gitconfig
[user]
name = Kelley-Stephens
email = kelley.stephens@daveramsey.com
[core]
excludesfile = ~/.gitignore
[alias]
co = checkout
br = branch
st = status
cob = "!f() { ticketnum=$1; branchName=$2; git checkout -b \"B2CH-${ticketnum}/${branchName}\"; }; f"
undo = reset --soft HEAD~1
com = checkout master
pom = pull origin master
amend = commit -a --amend --no-edit
count = "!f() { compareBranch=${1-master}; git rev-list --count HEAD ^$compareBranch; }; f"
squashbase = "!f() { branchName=${1-master}; commitCount=$(git count $branchName); git rebase -i HEAD~$commitCount; }; f"
pullbase = "!f() { branchName=${1-master}; git checkout $branchName && git pull && git checkout - && git rebase $branchName; }; f"
lg1 = log --graph --all --format=format:'%C(bold green)(%ar)%C(reset) %s %C(bold white)— %an%C(reset)%C(bold yellow)%d%C(reset)' --abbrev-commit --date=relative
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment