-
JINLANG WANG authoredJINLANG WANG authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
README.md 1.06 KiB
Git Simulator
Let's start by practicing in the Git simulator here. Try to run commands to get to the following state (if you get stuck, check the solution here):

Useful commands for the above problem:
-
git commit
: make a new commit -
git branch bname
: create a branch namedbname
-
git checkout bname
: moveHEAD
to the commit referenced by thebname
-
git checkout c1
: moveHEAD
to thec1
commit -
git merge bname
: merge changes on thebname
branch into the current branch -
git branch -D bname
: delete the branch namedbname
If you have some free time at the end of the lab, you can try out the following challenge.
Try to get to this state (no answer to check for this one, so you'll need to work for it!):

Hint: Start by creating commits on four branches, b1, b2, b3, and b4. Merge b2 into b1 and b4 into b3. Then merge the two merge commits with a third merge commit.