-2

W are using eclipse and git to commit daily work on branch A, every commit has jira number. Now we would like to deliver a hotfix with about 50 commits from Branch A. Normally I create a new branch for the hotfix and cherry pick the commits I need from branch A to hotfix branch. As there are many commits that I have to cherry pick manually, I am wondering if there is a smart way for example to cherry-pick all commits that have certain tag in the commit message like jira number.

user1167753
  • 705
  • 3
  • 7
  • 15
  • 2
    I'd start with `git log --grep` to search for a specific text in commit messages. Then [`git cherry-pick --stdin`](https://git-scm.com/docs/git-cherry-pick#Documentation/git-cherry-pick.txt-codegitrev-list--reversemaster--READMEgitcherry-pick-n--stdincode). – phd Aug 08 '23 at 12:10

0 Answers0