-
Notifications
You must be signed in to change notification settings - Fork 919
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add PowerShell setup files for further katas
With this commit PowerShell setup files are added for the following katas: - commit-on-wrong-branch-2 - detached-head - ff-merge - ignore - investigation - merge-conflict - merge-mergesort - rebase-branch - reorder-the-history - reset - reverted-merge - save-my-commit - squashing - submodules
- Loading branch information
Showing
25 changed files
with
361 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
. ..\utils\make-exercise-repo.ps1 | ||
|
||
Set-Content -Value "Some coode" -Path myapp.txt | ||
Add-Content -Value "Some other line of code" -Path myapp.txt | ||
Add-Content -Value "Another line of code" -Path myapp.txt | ||
|
||
git add myapp.txt | ||
git commit -m "Initial commit" | ||
|
||
git checkout -b new-feature | ||
|
||
Add-Content -Value "First part of new awesome feature" -Path myapp.txt | ||
|
||
git add myapp.txt | ||
git commit -m "Implement first part of feature" | ||
|
||
git checkout master | ||
|
||
Set-Content -Value "Some coode" -Path myapp.txt | ||
Add-Content -Value "Some other line of code" -Path myapp.txt | ||
Add-Content -Value "Another line of code" -Path myapp.txt | ||
|
||
git add myapp.txt | ||
git commit -m "Fix bug" | ||
|
||
Add-Content -Value "Second part of new feature" -Path myapp.txt | ||
|
||
git add myapp.txt | ||
git commit -m "Implement second part of feature" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
. ..\utils\make-exercise-repo.ps1 | ||
|
||
Set-Content -Value "" -Path file1 | ||
|
||
git add file1 | ||
git commit -am "A" | ||
|
||
Set-Content -Value "" -Path file2 | ||
|
||
git add file2 | ||
git commit -am "B" | ||
|
||
Set-Content -Value "" -Path file3 | ||
|
||
git add file3 | ||
git commit -am "C" | ||
|
||
Set-Content -Value "" -Path file4 | ||
|
||
git add file4 | ||
git commit -am "D" | ||
|
||
git checkout HEAD~3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
. ..\utils\make-exercise-repo.ps1 | ||
|
||
Set-Content -Value "" -Path greeting.txt | ||
|
||
git add greeting.txt | ||
git commit -m "Add file greeting.txt" | ||
|
||
Set-Content -Value "hello" -Path greeting.txt | ||
|
||
git add greeting.txt | ||
git commit -m "Add content to greeting.txt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
. ..\utils\make-exercise-repo.ps1 | ||
|
||
Set-Content -Value "hello" -Path file1.txt | ||
|
||
echo "hello" > file1.txt | ||
git init | ||
git checkout -b master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
. ..\utils\make-exercise-repo.ps1 | ||
|
||
Set-Content -Value "" -Path test.md | ||
|
||
git add test.md | ||
git commit -m "Add test.md" | ||
|
||
New-Item src -ItemType Directory | Out-Null | ||
New-Item src\main -ItemType Directory | Out-Null | ||
Set-Content -Value "" -Path "src\file.c" | ||
Set-Content -Value "" -Path "src\main\main.h" | ||
|
||
git add src/ | ||
git commit -m "Add folders" | ||
|
||
Set-Content -Value "This is more data" -Path "src\main\main.h" | ||
|
||
git add src/main/main.h | ||
git commit -m "Put data in main.h" | ||
|
||
Set-Content -Value "This is also a bunch of data" -Path "test.md" | ||
|
||
git add test.md | ||
git commit -m "Fill test.md" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
. ..\utils\make-exercise-repo.ps1 | ||
|
||
Set-Content -Value "" -Path greeting.txt | ||
|
||
git add greeting.txt | ||
git commit -m "Add file greeting.txt" | ||
|
||
Set-Content -Value "hello" -Path greeting.txt | ||
|
||
git add greeting.txt | ||
git commit -m "Add content to greeting.txt" | ||
|
||
# Create a file on branch1 | ||
git checkout -b merge-conflict-branch1 | ||
|
||
Set-Content -Value "This is a relevant fact" -Path file.txt | ||
|
||
git add file.txt | ||
git commit -m "add relevant fact" | ||
|
||
git checkout master | ||
|
||
Set-Content -Value "This is an indispensable truth!" -Path file.txt | ||
|
||
git add file.txt | ||
git commit -m "add indispensable truth!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
. ..\utils\make-exercise-repo.ps1 | ||
|
||
Copy-Item "..\base.py" -Destination "mergesort.py" | ||
|
||
git add mergesort.py | ||
git commit -m "Fake it till you make it - Faking mergesort using python .sort() method" | ||
|
||
git checkout -b "Mergesort-Impl" | ||
|
||
Copy-Item "..\righty.py" -Destination "mergesort.py" | ||
|
||
git add mergesort.py | ||
git commit -m "Mergesort implemented on feature branch" | ||
|
||
git checkout master | ||
|
||
Copy-Item "..\lefty.py" -Destination "mergesort.py" | ||
|
||
git add mergesort.py | ||
git commit -m "Mergesort implemented on master" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
. ..\utils\make-exercise-repo.ps1 | ||
|
||
Set-Content -Value "" -Path greeting.txt | ||
|
||
git add greeting.txt | ||
git commit -m "Add file greeting.txt" | ||
|
||
Set-Content -Value "hello" -Path greeting.txt | ||
|
||
git add greeting.txt | ||
git commit -m "Add content to greeting.txt" | ||
|
||
# Go to uppercase on a branch | ||
git checkout -b uppercase | ||
|
||
Set-Content -Value "HELLO" -Path greeting.txt | ||
|
||
git commit -am "Change greeting to uppercase" | ||
|
||
# Move forward on master | ||
git checkout master | ||
|
||
Set-Content -Value "Greetings library" -Path README.md | ||
|
||
git add README.md | ||
git commit -m "Add readme" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
. ..\utils\make-exercise-repo.ps1 | ||
|
||
Set-Content -Value "initial" -Path foo.txt | ||
|
||
git add foo.txt | ||
git commit -m "foo.txt" | ||
|
||
Set-Content -Value "1" -Path file1 | ||
|
||
git add file1 | ||
git commit -m "file1" | ||
|
||
Set-Content -Value "9" -Path file9 | ||
|
||
git add file9 | ||
git commit -m "file9" | ||
|
||
Set-Content -Value "8" -Path file8 | ||
|
||
git add file8 | ||
git commit -m "file8" | ||
|
||
Set-Content -Value "3" -Path file3 | ||
|
||
git add file3 | ||
git commit -m "file3" | ||
|
||
Set-Content -Value "4" -Path file4 | ||
|
||
git add file4 | ||
git commit -m "file4" | ||
|
||
Set-Content -Value "5" -Path file5 | ||
|
||
git add file5 | ||
git commit -m "file5" | ||
|
||
Set-Content -Value "2" -Path file2 | ||
|
||
git add file2 | ||
git commit -m "file2" | ||
|
||
Set-Content -Value "6" -Path file6 | ||
|
||
git add file6 | ||
git commit -m "file6" | ||
|
||
Set-Content -Value "7" -Path file7 | ||
|
||
git add file7 | ||
git commit -m "file7" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
. ..\utils\make-exercise-repo.ps1 | ||
|
||
for ($i=1; $i -le 10; $i++) { | ||
Set-Content -Value $i -Path "$i.txt" | ||
|
||
git add . | ||
git commit -m $i | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
. ..\utils\make-exercise-repo.ps1 | ||
|
||
Set-Content -Value "library-1.2.3" -Path lib.txt | ||
Set-Content -Value "module using library-1.2.3" -Path mymodule.txt | ||
|
||
git add lib.txt mymodule.txt | ||
git commit -m "Adding module with its library" | ||
|
||
git branch integrate-library-1.2.4 | ||
git checkout integrate-library-1.2.4 | ||
|
||
Set-Content -Value "library-1.2.4" -Path lib.txt | ||
Add-Content -Value "New library functionality" -Path lib.txt | ||
Set-Content -Value "module using library-1.2.4" -Path mymodule.txt | ||
|
||
git add lib.txt | ||
git add mymodule.txt | ||
git commit -m "Update to library version 1.2.4" | ||
|
||
Add-Content -Value "Use new library functionality" -Path mymodule.txt | ||
|
||
git add mymodule.txt | ||
git commit -m "Use new functionality in mymodule" | ||
|
||
git checkout master | ||
|
||
Add-Content -Value "Promising feature X" -Path mymodule.txt | ||
|
||
git add mymodule.txt | ||
git commit -m "Add feature X" | ||
|
||
git merge integrate-library-1.2.4 --no-edit | ||
|
||
# deal with merge conflict | ||
Set-Content -Value "module using library-1.2.4" -Path mymodule.txt | ||
Add-Content -Value "Promising feature X" -Path mymodule.txt | ||
Add-Content -Value "Use new library functionality" -Path mymodule.txt | ||
|
||
git add mymodule.txt | ||
git commit -m "Merge integrate-library-1.2.4" --no-edit | ||
|
||
Add-Content -Value "Useful feature Y" -Path mymodule.txt | ||
|
||
git add mymodule.txt | ||
git commit -m "Add feature Y" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.