diff --git a/levels/top-down/commit/description b/levels/top-down/commit/description new file mode 100644 index 0000000..490e884 --- /dev/null +++ b/levels/top-down/commit/description @@ -0,0 +1,13 @@ +So you've been working on a project for a while, and decide you want to put it in a Git repository. + +Here's how to do it! First, you initialize a new Git repository in your current directory: + + git init + +Then say that you want to record the current state of all files: + + git add . + +And then you make a commit, which gives the current state a description, a date, and your name: + + git commit diff --git a/levels/top-down/commit/goal b/levels/top-down/commit/goal new file mode 100644 index 0000000..bf9390a --- /dev/null +++ b/levels/top-down/commit/goal @@ -0,0 +1,2 @@ +git add . +git commit -m "Initial commit" diff --git a/levels/top-down/commit/start b/levels/top-down/commit/start new file mode 100644 index 0000000..7d6a06f --- /dev/null +++ b/levels/top-down/commit/start @@ -0,0 +1,4 @@ +mkdir recipes +echo -e "blueberries\nflour" > recipes/blueberry_cake.txt +echo -e "water\ncarrots" > recipes/carrot soup.txt +echo "Very good recipes!" > README.md diff --git a/levels/top-down/commit/win b/levels/top-down/commit/win new file mode 100644 index 0000000..19d4d8f --- /dev/null +++ b/levels/top-down/commit/win @@ -0,0 +1 @@ +test "$(git rev-parse HEAD^{tree})" = 1e02e3151284d0e22cd9b07ca5c5dbae2f3cb521 diff --git a/levels/top-down/rebase/description b/levels/top-down/rebase/description new file mode 100644 index 0000000..4273ffe --- /dev/null +++ b/levels/top-down/rebase/description @@ -0,0 +1 @@ +Rebase all branches on top of the main branch, so that the commits are in alphabetical order, and then point the main branch to the top commit. diff --git a/levels/top-down/rebase/goal b/levels/top-down/rebase/goal new file mode 100644 index 0000000..c0cbac1 --- /dev/null +++ b/levels/top-down/rebase/goal @@ -0,0 +1,9 @@ +git switch side1 +git rebase main +git switch side2 +git rebase side1 +git switch main +git merge side2 + +git reflog expire --expire=all --all +git prune diff --git a/levels/top-down/rebase/start b/levels/top-down/rebase/start new file mode 100644 index 0000000..63c6c4b --- /dev/null +++ b/levels/top-down/rebase/start @@ -0,0 +1,12 @@ +git commit --allow-empty -m A +git commit --allow-empty -m B +git commit --allow-empty -m C + +git switch -c side1 main~1 +git commit --allow-empty -m D +git commit --allow-empty -m E + +git switch -c side2 main~2 +git commit --allow-empty -m F + +git checkout main diff --git a/levels/top-down/rebase/win b/levels/top-down/rebase/win new file mode 100644 index 0000000..dfac9cb --- /dev/null +++ b/levels/top-down/rebase/win @@ -0,0 +1 @@ +diff <(git log --pretty=%s main) <(echo -e "F\nE\nD\nC\nB\nA") diff --git a/main.tscn b/main.tscn index 4eb7c7e..45967fb 100644 --- a/main.tscn +++ b/main.tscn @@ -193,6 +193,7 @@ size_flags_vertical = 3 repository_path = NodePath("../../Repositories/ActiveRepository") [node name="Test" type="Node2D" parent="."] +visible = false script = ExtResource( 9 ) [node name="TCPServer" type="Node" parent="Test"]