mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2024-12-24 20:33:19 +01:00
Remote problems level
This commit is contained in:
parent
c99a35d54f
commit
8a86009e2f
1 changed files with 33 additions and 0 deletions
33
levels/remotes/problems
Normal file
33
levels/remotes/problems
Normal file
|
@ -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
|
Loading…
Reference in a new issue