diff --git a/3-way-merge/README.md b/3-way-merge/README.md index 04e1701..0eb5691 100755 --- a/3-way-merge/README.md +++ b/3-way-merge/README.md @@ -2,7 +2,7 @@ ## Setup -1. Run `. setup.sh` (or `.\setup.ps1` in PowerShell) +1. Run `./setup.sh` (or `.\setup.ps1` in PowerShell) ## The task 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. diff --git a/advanced-rebase-interactive/README.md b/advanced-rebase-interactive/README.md index 2ecd8a7..56012b3 100755 --- a/advanced-rebase-interactive/README.md +++ b/advanced-rebase-interactive/README.md @@ -14,7 +14,7 @@ As this is an advanced exercise, there are no specific steps to follow and no si ## Setup: -1. Run `. setup.sh` (or `.\setup.ps1` in PowerShell) +1. Run `./setup.sh` (or `.\setup.ps1` in PowerShell) ## Task diff --git a/amend/README.md b/amend/README.md index 263bc9b..0d7f672 100755 --- a/amend/README.md +++ b/amend/README.md @@ -6,7 +6,7 @@ Sometimes we just forget something obvious that we want to fix quickly. ## Setup: -1. Run `. setup.sh` (or `.\setup.ps1` in PowerShell) +1. Run `./setup.sh` (or `.\setup.ps1` in PowerShell) ## The task 1. What does `git status` tell us? diff --git a/bad-commit/README.md b/bad-commit/README.md index a8f2134..bdf7267 100755 --- a/bad-commit/README.md +++ b/bad-commit/README.md @@ -7,7 +7,7 @@ Find the commit and revert it using bisect. ## Setup: -1. Run `. setup.sh` (or `.\setup.ps1` in PowerShell) +1. Run `./setup.sh` (or `.\setup.ps1` in PowerShell) ## Useful commands diff --git a/basic-branching/README.md b/basic-branching/README.md index 2ab43b0..b91cab9 100755 --- a/basic-branching/README.md +++ b/basic-branching/README.md @@ -1,7 +1,7 @@ # Git Kata: Basic Branching ## Setup: -1. Run `. setup.sh` (or `.\setup.ps1` in PowerShell) +1. Run `./setup.sh` (or `.\setup.ps1` in PowerShell) ## The task 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. diff --git a/basic-cleaning/README.md b/basic-cleaning/README.md index e46a0d1..a1520fb 100755 --- a/basic-cleaning/README.md +++ b/basic-cleaning/README.md @@ -2,7 +2,7 @@ ## Setup: -1. Run `. setup.sh` (or `.\setup.ps1` in PowerShell) +1. Run `./setup.sh` (or `.\setup.ps1` in PowerShell) ## The task You are working on a project that involves generated files. Say you are compiling C files into object files. Before checking out a new branch you want to start clean diff --git a/basic-revert/README.md b/basic-revert/README.md index 5d63493..f9a1c88 100755 --- a/basic-revert/README.md +++ b/basic-revert/README.md @@ -1,7 +1,7 @@ # Git Kata: Basic revert ## Setup: -1. Run `. setup.sh` (or `.\setup.ps1` in PowerShell) +1. Run `./setup.sh` (or `.\setup.ps1` in PowerShell) ## The task diff --git a/basic-staging/README.md b/basic-staging/README.md index 2f46903..75cd626 100755 --- a/basic-staging/README.md +++ b/basic-staging/README.md @@ -14,7 +14,7 @@ We will also work with `git reset` to reset the staged changes of a file, and `g ## Setup: -1. Run `. setup.sh` (or `.\setup.ps1` in PowerShell) +1. Run `./setup.sh` (or `.\setup.ps1` in PowerShell) ## The task diff --git a/basic-staging/file.txt b/basic-staging/file.txt new file mode 100644 index 0000000..f6b91e0 --- /dev/null +++ b/basic-staging/file.txt @@ -0,0 +1 @@ +56 diff --git a/basic-stashing/README.md b/basic-stashing/README.md index 1c04ab1..6b36af7 100755 --- a/basic-stashing/README.md +++ b/basic-stashing/README.md @@ -2,7 +2,7 @@ ## Setup: -1. Run `. setup.sh` (or `.\setup.ps1` in PowerShell) +1. Run `./setup.sh` (or `.\setup.ps1` in PowerShell) ## The task diff --git a/bisect/README.md b/bisect/README.md index dd33f56..e9f4ba7 100755 --- a/bisect/README.md +++ b/bisect/README.md @@ -16,7 +16,7 @@ $ ./test.sh ``` ## Setup: -1. Run `. setup.sh` +1. Run `./setup.sh` ## Tasks diff --git a/commit-on-wrong-branch-2/README.md b/commit-on-wrong-branch-2/README.md index 22ba06e..979e506 100755 --- a/commit-on-wrong-branch-2/README.md +++ b/commit-on-wrong-branch-2/README.md @@ -12,7 +12,7 @@ the `master` branch instead of the feature branch. ## Setup: -1. Run `. setup.sh` (or `.\setup.ps1` in PowerShell) +1. Run `./setup.sh` (or `.\setup.ps1` in PowerShell) ## The task diff --git a/commit-on-wrong-branch/README.md b/commit-on-wrong-branch/README.md index 4979f34..fda0f30 100755 --- a/commit-on-wrong-branch/README.md +++ b/commit-on-wrong-branch/README.md @@ -1,12 +1,12 @@ # gitkatas ## Setup: -1. Run `. setup.sh` (or `.\setup.ps1` in PowerShell) +1. Run `./setup.sh` (or `.\setup.ps1` in PowerShell) ## Kata 5: Commit on wrong branch This kata was shameless ripped off from [Git Katas](http://blog.schauderhaft.de/gitkata/) -You are working really hard on the master branch. +You are working really hard on the master branch. Part of your work is already committed. This is when your boss comes in with an urgent request. 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. diff --git a/detached-head/README.md b/detached-head/README.md index 09016b6..0b2f4cc 100755 --- a/detached-head/README.md +++ b/detached-head/README.md @@ -2,7 +2,7 @@ ## Setup: -1. Run `. setup.sh` (or `.\setup.ps1` in PowerShell) +1. Run `./setup.sh` (or `.\setup.ps1` in PowerShell) ## Detached head state @@ -20,4 +20,4 @@ Note that this task might seem more confusing if you did not run `setup.sh` in y We want to have a branch called `the-beginning` that is made from the first commit with message `A` -How would you do this? \ No newline at end of file +How would you do this? diff --git a/ff-merge/README.md b/ff-merge/README.md index 8159595..51e536d 100755 --- a/ff-merge/README.md +++ b/ff-merge/README.md @@ -1,7 +1,7 @@ # Git Kata: Fast-forward Merge ## Setup: -1. Run `. setup.sh` (or `.\setup.ps1` in PowerShell) +1. Run `./setup.sh` (or `.\setup.ps1` in PowerShell) ## The task diff --git a/ignore/README.md b/ignore/README.md index c29d7e2..51211fb 100755 --- a/ignore/README.md +++ b/ignore/README.md @@ -10,7 +10,7 @@ If you want to signal to git that a file needs to be removed from git, but still ## Setup: -1. Run `. setup.sh` (or `.\setup.ps1` in PowerShell) +1. Run `./setup.sh` (or `.\setup.ps1` in PowerShell) ## The task diff --git a/investigation/README.md b/investigation/README.md index 717050e..aaf5ec0 100755 --- a/investigation/README.md +++ b/investigation/README.md @@ -10,7 +10,7 @@ Objects are stored in `/.git/objects` in subfolders matching the fir ## Setup: -1. Run `. setup.sh` (or `.\setup.ps1` in PowerShell) +1. Run `./setup.sh` (or `.\setup.ps1` in PowerShell) ## Task diff --git a/merge-conflict/README.md b/merge-conflict/README.md index 2b17d9e..ec2eee1 100755 --- a/merge-conflict/README.md +++ b/merge-conflict/README.md @@ -2,7 +2,7 @@ ## Setup: -1. Run `. setup.sh` (or `.\setup.ps1` in PowerShell) +1. Run `./setup.sh` (or `.\setup.ps1` in PowerShell) ## The task diff --git a/merge-driver/README.md b/merge-driver/README.md index 60ad015..0dd5527 100755 --- a/merge-driver/README.md +++ b/merge-driver/README.md @@ -7,7 +7,7 @@ We'll do this by setting up `merge-tst-files.sh` as a _merge driver_ for `.tst` ## Setup: -1. Run `. setup.sh` +1. Run `./setup.sh` ## The task diff --git a/merge-mergesort/README.md b/merge-mergesort/README.md index f745304..e06e235 100755 --- a/merge-mergesort/README.md +++ b/merge-mergesort/README.md @@ -9,7 +9,7 @@ The task is to look at the merge conflict, and solve it by editing the file acco ## Setup: -1. Run `. setup.sh` (or `.\setup.ps1` in PowerShell) +1. Run `./setup.sh` (or `.\setup.ps1` in PowerShell) ## The task diff --git a/rebase-branch/README.md b/rebase-branch/README.md index fda618e..af0f6b8 100755 --- a/rebase-branch/README.md +++ b/rebase-branch/README.md @@ -1,7 +1,7 @@ # Git Kata: rebase branch ## Setup: -1. Run `. setup.sh` (or `.\setup.ps1` in PowerShell) +1. Run `./setup.sh` (or `.\setup.ps1` in PowerShell) ## The task diff --git a/rebase-exec/README.md b/rebase-exec/README.md index 38373eb..0b5cae4 100755 --- a/rebase-exec/README.md +++ b/rebase-exec/README.md @@ -2,7 +2,7 @@ ## Setup -1. Run `. setup.sh` (or `.\setup.ps1` in PowerShell) +1. Run `./setup.sh` (or `.\setup.ps1` in PowerShell) ## Task diff --git a/reorder-the-history/README.md b/reorder-the-history/README.md index 23fae21..3496ef6 100755 --- a/reorder-the-history/README.md +++ b/reorder-the-history/README.md @@ -6,7 +6,7 @@ You should fix this such that our `git log` looks great! ## Setup -1. Run `. setup.sh` (or `.\setup.ps1` in PowerShell) +1. Run `./setup.sh` (or `.\setup.ps1` in PowerShell) ## Task diff --git a/reset/README.md b/reset/README.md index 80d0b18..8a5dce3 100755 --- a/reset/README.md +++ b/reset/README.md @@ -5,7 +5,7 @@ We use reset to unstage change, but we can also do many more different things. ## Setup -1. Run `. setup.sh` (or `.\setup.ps1` in PowerShell) +1. Run `./setup.sh` (or `.\setup.ps1` in PowerShell) ## Task 1. How does your working directory look like? diff --git a/reverted-merge/README.md b/reverted-merge/README.md index 88f4219..d5aaffa 100755 --- a/reverted-merge/README.md +++ b/reverted-merge/README.md @@ -16,14 +16,14 @@ production, you decide to revert the merge commit. ## Setup -1. Run `. setup.sh` (or `.\setup.ps1` in PowerShell) +1. Run `./setup.sh` (or `.\setup.ps1` in PowerShell) ## The task -* Revert the merge commit +* Revert the merge commit *Note: You may assume that feature Y is also working with the old library version* * Take the role of the library team and fix the bug in the library on the branch -* Explore how you can get the changes from the branch into the master again +* Explore how you can get the changes from the branch into the master again Try to merge first to see what happens For in depth discussion of some the the issues that can happen when reverting a merge commit consult this gist: diff --git a/save-my-commit/README.md b/save-my-commit/README.md index bd2ac27..b7c3be5 100755 --- a/save-my-commit/README.md +++ b/save-my-commit/README.md @@ -5,13 +5,13 @@ Save it! ## Setup -1. Run `. setup.sh` (or `.\setup.ps1` in PowerShell) +1. Run `./setup.sh` (or `.\setup.ps1` in PowerShell) # Task 1. Save the most important commit that was lost 1. What's the difference between saving using reset and using cherry-pick? 1. Remove the `exercise` folder. -1. Run `. setup.sh` (or `.\setup.ps1` in PowerShell) +1. Run `./setup.sh` (or `.\setup.ps1` in PowerShell) 1. Run `git gc` 1. Can you still save the lost commit? 1. For extra credit what if someone reset their branch, force pushed and you pulled? Can you restore the old state? diff --git a/squashing/README.md b/squashing/README.md index 9069959..16ac6b7 100755 --- a/squashing/README.md +++ b/squashing/README.md @@ -10,7 +10,7 @@ While you are at it I would really like the ugly `\n` characters inside `file.tx ## Setup -1. Run `. setup.sh` (or `.\setup.ps1` in PowerShell) +1. Run `./setup.sh` (or `.\setup.ps1` in PowerShell) ## Task diff --git a/submodules/README.md b/submodules/README.md index 5dbc37d..7c866d6 100755 --- a/submodules/README.md +++ b/submodules/README.md @@ -5,13 +5,13 @@ This allows you to grab source change directly, as well as _pushing_ them back. ## Setup -1. Run `. setup.sh` (or `.\setup.ps1` in PowerShell) +1. Run `./setup.sh` (or `.\setup.ps1` in PowerShell) > NOTE: If running setup.sh on windows, you can run into problems by sourcing the setup script. Instead, run `./setup.sh`, and the folders would be created correctly. ## Task -After running `. setup.sh` or `. ./setup.sh`, you'll be left with two repositories inside the `exercises` folder. +After running `./setup.sh` or `. ./setup.sh`, you'll be left with two repositories inside the `exercises` folder. * A `product` repository * A `component` repository.