...

/

Walkthrough of a Simple Rebase

Walkthrough of a Simple Rebase

Learn about "git rebase" with the help of an example.

Rebase scenario

Let’s walk through the scenario from the previous lesson with Git commands.

1	mkdir lgthw_rebase
2	cd lgthw_rebase
3	git init
4	echo A > file1
5	git add file1
6	git commit -am A
7	echo B >> file1
8	git commit -am B
9	echo C >> file1
10	git commit -am C
11	git checkout -b feature1
Terminal 1
Terminal
Loading...

The -b flag

This is a shortcut that creates the branch and checks it out all at once. Using this means you don’t get into the situation where you can create a ...