Want to make a branch ?
git checkout
Want to make switch branches ?
git checkout
Want to get a specific file version ?
git checkout
Want to get remove changes to one file ?
Believe it or not, also
git checkout
6 points
Git’s smart enough to realize it’s the same commit and skip it.
Common workflow use of cherry-pick:
- Say you have a master branch and a release branch
- You have a bug in production (off your release branch)
- You have other changes in master that are not ready for release
- You make a commit to fix the bug and merge to master, run CI and verify it’s fixed
- Cherry pick the change to the release branch and release as normal
- Merge with master before next release to make sure you can cut a new release
All this works without issue.