Skip to content

Instantly share code, notes, and snippets.

@nsisodiya
Created September 4, 2013 08:05
Show Gist options
  • Save nsisodiya/6434059 to your computer and use it in GitHub Desktop.
Save nsisodiya/6434059 to your computer and use it in GitHub Desktop.
git push your commits , the proper way to do it from branch !
#!/bin/bash
git checkout narendra
echo "On Narendra Branch now"
echo "== Fetch"
git fetch;
echo "== Rebasing now"
git stash && git rebase origin/master && git stash pop
echo "done"
git checkout master
echo "on master now"
echo "== git pull on master"
git pull
echo "== git merge from narendra on master"
git merge narendra
echo "== git push"
git push
git checkout narendra
echo "On Narendra Branch now"
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment