From 8a86009e2fadc25a7bb66438536f441face4d0c9 Mon Sep 17 00:00:00 2001 From: blinry Date: Thu, 7 Jan 2021 15:23:14 +0100 Subject: [PATCH] Remote problems level --- levels/remotes/problems | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 levels/remotes/problems diff --git a/levels/remotes/problems b/levels/remotes/problems new file mode 100644 index 0000000..1f446fe --- /dev/null +++ b/levels/remotes/problems @@ -0,0 +1,33 @@ +title = Problems +cards = checkout add pull push commit-auto + +[description] + +Both you and your friend have been working on the file, and want to sync up! + +[setup yours] + +echo "The bike shed should be ???" > file +git add . +git commit -m "initial" + +git push -u friend main + +echo "The bike shed should be green" > file + +[setup friend] + +git checkout main + +echo "The bike shed should be blue" > file +git commit -a -m "friends version" + +[win] + +# Commit your local changes. +test "$(git status -s)" = "" + +[win friend] + +# Look at your friend's suggestion, make a compromise, and push it back. +git show main:file | grep green && git show main:file | grep blue