Git move commits to different branch, and make master same as upstream master branch -
i making pull request , master got merged didnt move different branch because of few commits added master branch , later on moved brancha , added more commits different pull request. can can remove commits , revert upstream main save commits in different branch.
| | . (master merged upstream repo) | | | . (pull request - pr1) \ (new brancha) \ | | . ( pull request - pr2)
the new branch contains commits unmerged master branch. how can remove commits , make new branch. want
| | . (master merged upstream repo) \ \ \ \ | | | | | | (br- | anchb) | pr1 (brancha) pr2
any pointers how can achieved? thank you
if understand correctly, want move branch2 earlier of master , apply commits had changed since branch1. if so, should following:
git checkout -b branchb git reset --hard <commit want change>
or switch 2 commits back(if picture right):
git reset --hard brancha^^
Comments
Post a Comment