I am working on a local branch git checkout 98ea3c8042c39e I made some significant changes to the code. And then I've committed it again. Now I need to go back to my branch What should I do if I want to: Removing my Go back to my Go back to your branch and Abandon everything: your new commit left floating in the middle of nowhere Will, and will eventually collect garbage by Git. By contrast, if you are ready to create Back Now you will have the code change with VISS . Then I decided to see the previous commitment:
VISS to make these changes.
VISS from the branch, which is the previous committ ( 98ea3c8042c39e ) was checked before checking out. VISS . VISS branch, merge new changes with the works done by me on top of VISS .
git checkout VISS 98ea3c at the top VISS and leave it VISS currently Pointing to, do the following:
git checkout VISS git reset - Hard 98ea3c VISS < / Code> and merge your new changes at the top of it:
# You only get new commitments: Git rebase VISS # Abc123 "; So: GIT checkout VISS GIT merge ABC 123 VISS , and there will be no merge commitments.
Comments
Post a Comment