Created
May 17, 2013 09:21
-
-
Save mike-zhang/5597980 to your computer and use it in GitHub Desktop.
Revisions
-
mike created this gist
May 17, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ #! /usr/bin/python import os dir1 = "essays" dir2 = "../tmp" tmpBranchName = "other" execCommand = os.system strCmd1 = "cd %s && git remote add %s %s && git fetch %s \ && git checkout -b %s %s/master && git checkout master \ && git merge %s && git branch -d %s && cd .." % (dir1,tmpBranchName,dir2, \ tmpBranchName,tmpBranchName,tmpBranchName,tmpBranchName,tmpBranchName,) print strCmd1 execCommand(strCmd1)