Branch Off a Tag in Git

I recently needed to branch off a few libraries to cherry pick some recent changes back to an old product. The following steps for branching are proven to be working:

  1. clone the project repository to your local pc if not yet;
  2. cd into the project folder
  3. branch off the tag (i.e. named “TTT”) and name the branch to xxx (git branch xxx TTT)
  4. check it out (git checkout XXX)
  5. push it to origin (git push origin XXX)

And this point, you should be able to see both a remote and local XXX branch and you can start to cherry pick code.

This entry was posted in Tool and Debug and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s