Beginning of remotes chapter

This commit is contained in:
blinry 2021-01-06 13:10:32 +01:00
parent d9a9498277
commit e6b12b75f7
5 changed files with 95 additions and 0 deletions
levels/remotes

35
levels/remotes/fetch Normal file
View file

@ -0,0 +1,35 @@
title = Fetching from remotes
cards = checkout
[description]
Here, you already have two remotes configured! You can list them using `git remote`.
Fetch from both, and look at the suggestions.
Then, make a new commit on top of your original one that introduces a compromise.
[setup]
echo "The bikeshed should be ???" > proposal
git add .
git commit -m "What do you think?"
[setup friend1]
git pull yours main
echo "The bikeshed should be green" > proposal
git commit -am "Green"
[setup friend2]
git pull yours main
echo "The bikeshed should be blue" > proposal
git commit -am "Blue"
[win]
# Your proposal is acceptable for friend1.
git show main:proposal | git grep green
# Your proposal is acceptable for friend2.
git show main:proposal | git grep blue