If you accidentally committed your code to the wrong branch, you don’t have to redo the work. IntelliJ IDEA offers a low-stress solution by allowing you to move your commit to a different branch using Git’s cherry-pick option.
Links
- (code) https://github.com/mlvandijk/git_tips
- (blog) Cherry-pick: Move a commit to a different branch
- (JetBrains – IntelliJ IDEA) Cherry-pick separate commits
- (Git documentation) Git cherry-pick
- (blog) Marco Behler: Git: Merge, Cherry-Pick & Rebase
- (blog) IntelliJ IDEA: Resolving Merge Conflicts in Git
- (blog) Foojai.io: Resolving Git Merge Conflicts in IntelliJ IDEA