2021-01-07 15:23:14 +01:00
|
|
|
title = Problems
|
2021-01-14 11:44:23 +01:00
|
|
|
cards = checkout add pull push commit-auto merge
|
2021-01-07 15:23:14 +01:00
|
|
|
|
|
|
|
[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.
|
2021-04-12 16:23:10 +02:00
|
|
|
git rev-parse main^ && test "$(git rev-parse main^1^)" = "$(git rev-parse main^2^)"
|