Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: Resolving upstream fetches that have conflicts may result in broken build #11

Open
weex opened this issue Aug 17, 2021 · 2 comments

Comments

@weex
Copy link
Member

weex commented Aug 17, 2021

If fetching upstream requires opening a pull request so that conflicts can be resolved, and such conflicts are resolved as follows, then a merge is completed without letting CI run.

This is a specific example of what Github recommends for resolving conflicts using command line.

git checkout -b mastodon-main main
git pull https://github.com/mastodon/mastodon.git main
git o mastodon-main

Then commit to finish merge... (don't do this)

git o main
git merge --no-ff mastodon-main
git push origin main
@weex
Copy link
Member Author

weex commented Aug 21, 2021

The way to solve this is not to create the pull request initially. Instead, follow the same instructions as above except the second stanza should use an integration branch like upstream-integration instead of main. Then when that branch is pushed on the last line, it can be used to create a PR with no conflicts.

So the second stanza becomes: (do this)

git o upstream-integration
git merge --no-ff mastodon-main
git push origin upstream-integration

@weex
Copy link
Member Author

weex commented Oct 12, 2021

To clarify, here's what has worked twice:

git checkout -b mastodon-main main
git pull https://github.com/mastodon/mastodon.git main

Fix merge conflicts and git commit to finish that merge.

git o upstream-integrationX
git merge --no-ff mastodon-main
git push origin upstream-integrationX

where X is an unused number. If the branch upstream-integration is deleted after push, and created from our main at the beginning, then there's no need to keep creating new upstream-integrationX branches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant