Git: how to use cherry pick using smartgit

If you have have multiple git branches and you have pushed your code to branch x, but you also want it to be available on other branch too ex.: branch Y, then perform following steps:

  1. Checkout the branch Y, the place where you want to push your code
  2. Then from toolbar above, Branch->Cherry Pick
  3. Click Branches, and un-select the Head. Then select the branch X. Choose the commit you want to add to branch Y.
  4. Select and press Cherry pick and commit
  5. then press Push
  6. Done

Now branch Y has commit from branch X.

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s