I would not recommend using soft reset to fix commits on the wrong branch, especially with multiple commits. You end up with all the changes back to uncommitted, and having to sort through them in order to recreate the commits.
Say you meant for a series of commits, commit1 thru commit2, to be on branch1, but accidentally made them on branch2, to fix it, simply do:
I would not recommend using soft reset to fix commits on the wrong branch, especially with multiple commits. You end up with all the changes back to uncommitted, and having to sort through them in order to recreate the commits.
Say you meant for a series of commits,
commit1
thrucommit2
, to be onbranch1
, but accidentally made them onbranch2
, to fix it, simply do: