A Simple Cherry-Pick

Learn how you can apply the concept of "cherry-picking" with the help of an example.

Port changes from one branch to another

Since every commit in Git is a change set with a reference ID, you can easily port changes from one branch to another.

Setup

To demonstrate this, create a simple repository with two changes:

1	mkdir lgthw_cherry_pick
2	cd lgthw_cherry_pick
3	git init
4	echo change1 > file1
5	git add file1
6	git commit -am change1
7	echo change2 >> file1
8	git commit -am change2
9	git log --all --oneline --decorate --graph