Skip to content

Instantly share code, notes, and snippets.

@nickyleach
Created March 9, 2011 20:12

Revisions

  1. Nicky Leach created this gist Mar 9, 2011.
    2 changes: 2 additions & 0 deletions git-sync
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    [alias]
    sync = "!f(){ local branch=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e \"s/* \\(.*\\)/\\1/\"`; git pull origin $branch && git push origin $branch; }; f"