Lazy Diary @ Hatena Blog

PowerShell / Java / miscellaneous things about software development, Tips & Gochas. CC BY-SA 4.0/Apache License 2.0

現在のブランチの作業成果物を GitHub へ pushする

currentbranch=`git status | grep "On branch" | cut -d " " -f3`
git push origin $currentbranch
git checkout master
git pull upstream master
git push origin master
git checkout $currentbranch
git rebase master
git push -f origin $currentbranch

参考URL: http://kik.xii.jp/archives/179