Answer the question
In order to leave comments, you need to log in
How to push changes from one branch to another?
Good afternoon, tell me, please, how to transfer changes from one branch to another?
If it's not difficult - describe how you need to write in the console, otherwise I'm just learning how to work with the git.
Answer the question
In order to leave comments, you need to log in
take the hash of the commit (you can find it using the git log command) that you need to move to another branch, then switch to the desired branch and enter git cherry-pick <commit hash>, for example git cherry-pick 3ea6207fe84 and you will be good
Maks Kovyvchak's solution is
correct , but only in case you need to get or push one or more commits, but not all.
A more typical situation is when the work done in a separate branch needs to be completely poured into another. In gitflow, all commits go through this.
https://bitworks.software/2019-03-12-gitflow-workf...
To do this, use the git merge command
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question