Skip to content

Commit 92ffd7a

Browse files
priebekJKrag
authored andcommitted
add git switch to exercise basic-branching
1 parent ed2250f commit 92ffd7a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

basic-branching/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55

66
## The task
77
You again live in your own branch, this time we will be doing a bit of juggling with branches, to show how lightweight branches are in git.
8-
Hint: `git checkout` will make you switch from one branch to another.
8+
Hint: `git switch` and `git checkout` will make you switch from one branch to another.
99

1010
1. Use `git branch` to see the two branches that are relevant for this exercise
1111
2. What branch are you on?
1212
3. Use `git branch mybranch` to create a new branch called _mybranch_
1313
4. Use `git branch` again to see the new branch created.
14-
5. Use `git checkout mybranch` to switch to your new branch.
14+
5. Use `git switch mybranch` to switch to your new branch.
1515
6. How does the output from `git status` change when you switch between the _master_ and the new branch that you have created?
1616
7. How does the workspace change when you change between the two branches?
1717
8. Make sure you are on your _mybranch_ branch before you continue.
@@ -27,6 +27,7 @@ Hint: `git checkout` will make you switch from one branch to another.
2727
18. Use `git diff mybranch master` to see the difference between the two branches.
2828

2929
## Useful commands
30+
- `git switch`
3031
- `git checkout`
3132
- `git checkout -b`
3233
- `git log --oneline --graph`

0 commit comments

Comments
 (0)