Answers for "move commit changes into another branch"

5

git how to commit changes to another branch

git stash
git checkout other-branch
git stash pop
Posted by: Guest on February-28-2020
1

move commits to another branch

# Note: Any changes not committed will be lost.
git branch newbranch      # Create a new branch, saving the desired commits
git reset --hard HEAD~3   # Move master back by 3 commits (Make sure you know how many commits you need to go back)
git checkout newbranch    # Go to the new branch that still has the desired commits
Posted by: Guest on June-01-2021

Code answers related to "move commit changes into another branch"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language