File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 5
5
6
6
## The task
7
7
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.
9
9
10
10
1 . Use ` git branch ` to see the two branches that are relevant for this exercise
11
11
2 . What branch are you on?
12
12
3 . Use ` git branch mybranch ` to create a new branch called _ mybranch_
13
13
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.
15
15
6 . How does the output from ` git status ` change when you switch between the _ master_ and the new branch that you have created?
16
16
7 . How does the workspace change when you change between the two branches?
17
17
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.
27
27
18 . Use ` git diff mybranch master ` to see the difference between the two branches.
28
28
29
29
## Useful commands
30
+ - ` git switch `
30
31
- ` git checkout `
31
32
- ` git checkout -b `
32
33
- ` git log --oneline --graph `
You can’t perform that action at this time.
0 commit comments