Skip to content

Instantly share code, notes, and snippets.

@ntung
Forked from johnpolacek/.gitconfig
Created September 8, 2021 09:28
Show Gist options
  • Save ntung/55f6a34e9bc1748d6b390ca77a3aa4b6 to your computer and use it in GitHub Desktop.
Save ntung/55f6a34e9bc1748d6b390ca77a3aa4b6 to your computer and use it in GitHub Desktop.

Revisions

  1. @johnpolacek johnpolacek revised this gist Sep 14, 2020. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions .gitconfig
    Original file line number Diff line number Diff line change
    @@ -16,6 +16,7 @@
    staging = !git checkout staging && git pull origin staging
    master = !git checkout master && git pull origin
    po = push origin
    pu = !git push origin `git branch --show-current`
    pod = push origin dev
    pos = push origin staging
    pom = push origin master
  2. @johnpolacek johnpolacek revised this gist Sep 13, 2019. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion .gitconfig
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,6 @@
    brd = branch -d
    brD = branch -D
    merged = branch --merged
    dmerged = "git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
    st = status
    aa = add -A .
    cm = commit -m
  3. @johnpolacek johnpolacek revised this gist Jan 29, 2016. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions .gitconfig
    Original file line number Diff line number Diff line change
    @@ -21,6 +21,8 @@
    pos = push origin staging
    pom = push origin master
    poh = push origin HEAD
    pogm = !git push origin gh-pages && git checkout master && git pull origin master && git rebase gh-pages && git push origin master && git checkout gh-pages
    pomg = !git push origin master && git checkout gh-pages && git pull origin gh-pages && git rebase master && git push origin gh-pages && git checkout master
    plo = pull origin
    plod = pull origin dev
    plos = pull origin staging
  4. @johnpolacek johnpolacek revised this gist Jun 26, 2015. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions .gitconfig
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,7 @@
    brd = branch -d
    brD = branch -D
    merged = branch --merged
    dmerged = "git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
    st = status
    aa = add -A .
    cm = commit -m
  5. @johnpolacek johnpolacek revised this gist Oct 21, 2014. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions .gitconfig
    Original file line number Diff line number Diff line change
    @@ -3,6 +3,9 @@
    cob = checkout -b
    coo = !git fetch && git checkout
    br = branch
    brd = branch -d
    brD = branch -D
    merged = branch --merged
    st = status
    aa = add -A .
    cm = commit -m
  6. @johnpolacek johnpolacek revised this gist Oct 19, 2014. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions .gitconfig
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,6 @@
    [alias]
    co = checkout
    cob = checkout -b
    coo = !git fetch && git checkout
    br = branch
    st = status
  7. @johnpolacek johnpolacek revised this gist Oct 19, 2014. 1 changed file with 7 additions and 1 deletion.
    8 changes: 7 additions & 1 deletion .gitconfig
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,7 @@
    aa = add -A .
    cm = commit -m
    aacm = !git add -A . && git commit -m
    cp = cherry-pick
    amend = commit --amend -m
    dev = !git checkout dev && git pull origin dev
    staging = !git checkout staging && git pull origin staging
    @@ -20,4 +21,9 @@
    plos = pull origin staging
    plom = pull origin master
    ploh = pull origin HEAD
    unstage = reset --soft HEAD^
    unstage = reset --soft HEAD^
    ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
    ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
    f = "!git ls-files | grep -i"
    gr = grep -Ii
    la = "!git config -l | grep alias | cut -c 7-"
  8. @johnpolacek johnpolacek revised this gist Oct 19, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion .gitconfig
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,6 @@
    [alias]
    co = checkout
    coo = !git fetch && git checkout
    br = branch
    st = status
    aa = add -A .
    @@ -19,5 +20,4 @@
    plos = pull origin staging
    plom = pull origin master
    ploh = pull origin HEAD
    coo = fetch && checkout
    unstage = reset --soft HEAD^
  9. @johnpolacek johnpolacek created this gist Oct 19, 2014.
    23 changes: 23 additions & 0 deletions .gitconfig
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    [alias]
    co = checkout
    br = branch
    st = status
    aa = add -A .
    cm = commit -m
    aacm = !git add -A . && git commit -m
    amend = commit --amend -m
    dev = !git checkout dev && git pull origin dev
    staging = !git checkout staging && git pull origin staging
    master = !git checkout master && git pull origin
    po = push origin
    pod = push origin dev
    pos = push origin staging
    pom = push origin master
    poh = push origin HEAD
    plo = pull origin
    plod = pull origin dev
    plos = pull origin staging
    plom = pull origin master
    ploh = pull origin HEAD
    coo = fetch && checkout
    unstage = reset --soft HEAD^