Skip to content

Commit 8939fd0

Browse files
committed
Cleaned up markdown in README files
Mostly fixing markdown-lint errors
1 parent 92ffd7a commit 8939fd0

File tree

8 files changed

+46
-29
lines changed

8 files changed

+46
-29
lines changed

3-way-merge/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
1. Run `source setup.sh` (or `.\setup.ps1` in PowerShell)
66

77
## The task
8+
89
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.
910

1011
1. Create a branch called greeting and check it out
@@ -20,6 +21,7 @@ You again live in your own branch, this time we will be doing a bit of juggling
2021
11. What is the output of `git log --oneline --graph --all` now? Observe the extra merge commit created with the message "Merge branch 'greeting'".
2122

2223
## Useful commands
24+
2325
- `git branch`
2426
- `git branch <branch-name>`
2527
- `git branch -d <branch-name>`

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,9 @@ There is a very small test that you can run in powershell or bash.
174174
It is contained in the scripts `test.sh` and `test.ps1`.
175175

176176
### Cleanup
177+
177178
You can remove testing artifacts, `exercise` directories, with the git clean command:
179+
178180
```sh
179181
git clean -ffdX
180182
```

basic-branching/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# Git Kata: Basic Branching
2-
## Setup:
2+
3+
## Setup
34

45
1. Run `source setup.sh` (or `.\setup.ps1` in PowerShell)
56

67
## The task
8+
79
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.
810
Hint: `git switch` and `git checkout` will make you switch from one branch to another.
911

@@ -27,6 +29,7 @@ Hint: `git switch` and `git checkout` will make you switch from one branch to an
2729
18. Use `git diff mybranch master` to see the difference between the two branches.
2830

2931
## Useful commands
32+
3033
- `git switch`
3134
- `git checkout`
3235
- `git checkout -b`

basic-staging/README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
This kata will examine the staging area of git.
44

55
In git we are working with three different areas:
6+
67
* The working directory where you are making your changes
78
* The staging area where all changes you have added through `git add` will stay
89
* The repository where every commit ends up, making your history. To put your staged changes in here you issue the `git commit` command.
@@ -12,7 +13,7 @@ These changes do not have to be the same.
1213

1314
We will also work with `git reset` to reset the staged changes of a file, and `git checkout` to return a file to a previous state.
1415

15-
## Setup:
16+
## Setup
1617

1718
1. Run `source setup.sh` (or `.\setup.ps1` in PowerShell)
1819

@@ -43,8 +44,6 @@ You live in your own repository. There is a file called `file.txt`.
4344
21. What is the content of `file.txt`?
4445
22. What does `git status` tell us?
4546

46-
47-
4847
## Useful commands
4948

5049
- `git add`
@@ -56,7 +55,7 @@ You live in your own repository. There is a file called `file.txt`.
5655
- `git log -n 5`
5756
- `git log --oneline`
5857
- `git log --oneline --graph`
59-
- `git reset HEAD `
58+
- `git reset HEAD`
6059
- `git checkout`
6160

6261
## Aliases

commit-on-wrong-branch/README.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
# gitkatas
2-
## Setup:
2+
3+
## Setup
34

45
1. Run `source setup.sh` (or `.\setup.ps1` in PowerShell)
56

67
## Kata 5: Commit on wrong branch
8+
79
This kata was shameless ripped off from [Git Katas](http://blog.schauderhaft.de/gitkata/)
810

9-
You are working really hard on the master branch.
11+
You are working really hard on the master branch.
1012
Part of your work is already committed. This is when your boss comes in with an urgent request.
1113

1214
Since your current HEAD is not ready for prime time you backup one commit, and start a new branch named 'quickfix'. You do whatever your boss wants and commit the changes to that new branch.
1315

1416
That's when you realize you created a minor mess with your branches.
1517

1618
Currently your commits look like this
17-
```
19+
20+
```text
1821
master
1922
|
2023
v
@@ -25,8 +28,10 @@ remote ^
2528
|
2629
quickfix
2730
```
31+
2832
But you want it to look like this:
29-
```
33+
34+
```text
3035
remote
3136
|
3237
v
@@ -38,19 +43,20 @@ But you want it to look like this:
3843

3944
Git ahead!
4045

41-
Note: since the B in the current and in the target structure don't have the same parent they can't be literally the same commit.
46+
Note: since the `B` in the current and in the target structure don't have the same parent they can't be literally the same commit.
4247

4348
## The task
4449

4550
1. Use `git log --oneline --graph --all` to view all the branches and their commits.
46-
2. Copy C onto master before B by rebasing quickfix on master.
47-
3. Make a new branch (changes-including-B) off of our master so we can keep working on B.
48-
4. Reset the HEAD on master back to C.
49-
5. Delete the quickfix branch.
50-
6. Push master. You can't do this in the training exercise.
51-
7. You can merge the changes-including-B branch to master and delete changes-including-B or just checkout changes-including-B and work there.
51+
2. Copy `C` onto `master` before `B` by rebasing `quickfix` on `master`.
52+
3. Make a new branch (`changes-including-B`) off of our `master` so we can keep working on `B`.
53+
4. Reset `master` back to `C`.
54+
5. Delete the `quickfix` branch.
55+
6. Push `master`. You can't do this in the training exercise.
56+
7. You can merge the `changes-including-B` branch to `master` and delete `changes-including-B` or just switch to `changes-including-B` and work there.
5257

5358
## Useful commands
59+
5460
- `git log --oneline --graph --all`
5561
- `git checkout <branch-name>`
5662
- `git rebase <branch-name>`

ff-merge/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Git Kata: Fast-forward Merge
2-
## Setup:
2+
3+
## Setup
34

45
1. Run `source setup.sh` (or `.\setup.ps1` in PowerShell)
56

@@ -15,16 +16,17 @@ You again live in your own branch, this time we will be doing a bit of juggling
1516
6. What is the output of `git branch`?
1617
7. What is the output of `git log --oneline --graph --all`
1718

18-
*Remember: you want to pull in the commit on the feature branch into master. The command 'git merge [branch name]' takes one branch as argument from which it takes commits. The commits are applied to the branch pointed to by HEAD (currently checked out branch).*
19+
*Remember: you want to pull in the commit on the feature branch into master. The command 'git merge [branch name]' takes one branch as argument from which it takes commits. The commits are applied to the branch pointed to by HEAD (currently checked out branch).*
1920

2021
8. Checkout `master` branch
21-
9. Use `cat` to see the contents of the greetings
22+
9. Use `cat` to see the contents of the greetings
2223
10. Diff the branches
2324
11. Merge the branches
2425
12. Use `cat` to see the contents of the greetings
2526
13. Delete the uppercase branch
2627

2728
## Useful commands
29+
2830
- `git branch`
2931
- `git branch <branch-name>`
3032
- `git branch -d <branch-name>`

rebase-branch/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# Git Kata: rebase branch
22

3-
## Setup:
4-
1. Run `source setup.sh` (or `.\setup.ps1` in PowerShell)
3+
## Setup
54

5+
1. Run `source setup.sh` (or `.\setup.ps1` in PowerShell)
66

77
## The task
8+
89
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.
910

1011
1. Which branches exist?
@@ -18,6 +19,7 @@ You again live in your own branch, this time we will be doing a bit of juggling
1819
9. What does the log look like now?
1920

2021
## Useful commands
22+
2123
- `git checkout <branch-name>`
2224
- `git rebase <branch-name>`
2325
- `git log --oneline --graph --all`

reverted-merge/README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,16 @@ features should be included in `mymodule.txt`.
2929
integrate branch, e.g. change `lib.txt`.
3030
3. Next we explore how you can get the changes from the branch into the master
3131
again. First try to merge to see what happens. The `lib.txt` file changes as
32-
expected, but '`mymodule.txt` does not. For an in depth discussion of
33-
the reason why consult this gist: [Reverting a faulty merge](https://github.com/git/git/blob/master/Documentation/howto/revert-a-faulty-merge.txt).
34-
> reverting a merge commit also
35-
> undoes the _data_ that the commit changed, but it does absolutely
36-
> nothing to the effects on _history_ that the merge had.
32+
expected, but '`mymodule.txt` does not. For an in depth discussion of
33+
the reason why, consult this gist: [Reverting a faulty merge](https://github.com/git/git/blob/master/Documentation/howto/revert-a-faulty-merge.txt).
34+
35+
> reverting a merge commit also
36+
> undoes the _data_ that the commit changed, but it does absolutely
37+
> nothing to the effects on _history_ that the merge had.
3738
>
38-
> So the merge will still exist, and it will still be seen as joining
39-
> the two branches together, and future merges will see that merge as
40-
> the last shared state
39+
> So the merge will still exist, and it will still be seen as joining
40+
> the two branches together, and future merges will see that merge as
41+
> the last shared state
4142
4243
4. Undo the merge with a reset --hard
4344
5. Revert the revert and try the merge again. This time it works.

0 commit comments

Comments
 (0)