Wednesday, January 02, 2013

Git Rebase PullRequest formula

If you want to do Git Rebase your pull request instead of merge you can follow this step wisely.

//checkout your branch
git checkout branchName

//git rebase to your master
git rebase master

//checkout master
git checkout master

//fast forward your master to your branch pointer by merge it.
git merge branchName

//push your master to your repository
Git push origin master

//push your branch to your repository with force
Git push –f origin branchName

---- Once you done this, Github will automatically detect your pull request rebase.
-----You can check on Github and hit delete button or you can do manually using this step

//delete your branch on your repository first
Git push origin :branchName

//delete your local branch
Git branch –D branchName

No comments: