I have two branches off of master, each one for a different feature, and then I have a synthesis branch that combines the two. I committed something to the synthesis branch, but now I see I would have rather applied that change to one of the branches particular to that feature. Is there a way to do this unapply/apply somewhere else maneuver with git?
相关问题
- Why does recursive submodule update from github fa
- Extended message for commit via Visual Studio Code
- Emacs shell: save commit message
- Can I organize Git submodules in a flat hierarchy?
- Upload file > 25 MB on Github
相关文章
- 请教Git如何克隆本地库?
- GitHub:Enterprise post-receive hook
- Git Clone Fails: Server Certificate Verification F
- SSIS solution on GIT?
- Is there a version control system abstraction for
- ssh: Could not resolve hostname git: Name or servi
- Cannot commit changes with gitextensions
- git: retry if http request failed
Generally, when I do something like this, I will:
git diff HEAD^ HEAD
)git cherry-pick
to apply the applicable commitI believe there is an easier way, but I prefer this since I use (and remember) the diff/cherry-pick commands better
Cherry-pick commit to target branch and reset source branch. Assuming, you want to move the latest commit from
source
branch totarget
, do:If the commit wasn't the last, you will have to use
git rebase -i
instead of the last command and choose specific commit name for yourcherry-pick
.