How it works...

We have been discussing the refs/notes/alsoCherryPick reference and so on. As you know, we refer to the remote branches as references, such as refs/remotes/origin/stable-3.2, but the local branches also have references such as refs/heads/develop, for instance.

Since you can create a branch that starts at a specific reference, you should be able to create a branch that starts at the refs/notes/alsoCherrypick reference:

  1. Create a branch that starts from refs/notes/alsoCherryPick. Also, checkout the branch:
$ git checkout -b myNotes notes/alsoCherryPick
Switched to a new branch 'myNotes'
  1. The myNotes branch now points to HEAD on refs/notes/alsoCherryPick. Listing the files on the branch will show a file with the commit hash ...

Get Git Version Control Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.