Reputation: 104
Okay ... here's the situation:
configs
configs
branch. but this new change does not affect previous changes (different files)configs
brachWell, my question is "How do you make this new commit as a new pull request or lets say pull request #2 but still in the same brach?"
thanks.
Upvotes: 4
Views: 1518
Reputation: 21908
Put your second commit on another branch
# now
A---B---C <<< main-line
\
D---E <<< configs
# target
A---B---C <<< main-line
\
D <<< configs
\
E <<< configs-plus
To achieve that, step by step :
# start from branch configs
git checkout configs
# Create the new branch (by default, it'll point at HEAD, so configs)
git branch configs-plus
# reset current branch (still configs) to last commit
git reset --hard @^
# finally, push (--force (or -f) needed because history has been rewritten)
git push -f origin HEAD
Then create a new PR configs-plus > main-line
. The first PR will have been updated by the force push to remove the second commit.
Upvotes: 4