Yan Pritzker photographer, entrepreneur, software engineer, musician, skier

skwpspace is Yan Pritzker's home on the web

Blog :: Photography :: About Me

TwitterCounter for @skwp

Get the news feed
Get updates by email
Follow me on twitter

hello, i'm yan

I am a photographer, entrepreneur, software engineer, guitarist, and telemark skier

This blog is about startups, blogging, Ruby On Rails, virtualization and cloud computing, photography, customer service, marketing, ux and design, git, and lots more.

planypus

I'm the founder of Planypus, the place to share your plans!

cohesiveft

Virtualize your application for download or deploy to the cloud in minutes!

flickr

sheepsicelandic mannequinbridgeskaterkristinaice flowstampede

Top Posts

Archives

Contact

Reach me at yan at pritzker.ws

Posted
13 May 2008 @ 9pm

Tagged
git, thoughts, tips

Git tips & tricks part 4: more on cherry picking

In my previous post I discussed how it was possible to merge individual changes from one branch to another. At that time I mentioned using the log on the original branch to figure out which changes were available to merge, but it turns out there’s an easier way.

Let’s say you made some changes in local-trunk and you want to merge them into your branch-1.5 which is your release branch. From the branch:

git cherry -v local-trunk
+ 08d7780de7e16a22b7e8ed1d42acebc4bc07573f  a changeset i haven't merged yet
- 78a7b285089c76664a530f68803259c53cbadb42 another change

Each line indicates a change. If it has a “+” it means they only exist in the local-trunk. A minus indicates changes that have already been merged in. Magic! Now that you know which changes you want, just cherry-pick them in.

git cherry-pick 08d7780de

Update: here’s another cool trick to see where every branch is at

git branch -v

Output looks like this:

branch        317544a #520 fix single page build
local-trunk ec85f65 #520 fix single page build



		        

No Comments Yet


There are no comments yet. You could be the first!

Leave a Comment