Skip to content

Fix merge mistakes #6501

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

Closed
wouterj opened this issue Apr 20, 2016 · 4 comments
Closed

Fix merge mistakes #6501

wouterj opened this issue Apr 20, 2016 · 4 comments
Labels

Comments

@wouterj
Copy link
Member

wouterj commented Apr 20, 2016

Yesterday, the GH tool merged the 3.0 branch into the 2.3 branch while rebasing a PR. I didn't notice this and merged everything p to the master branch. This means that every branch no includes the 3.0 version. The commit causing trouble is: fefc8a0 and 139e2e7

I've tried to revert all merges and revert the troubled merges. This doesn't work correctly though, as it means we have to revert all 2.3...3.0 changes in 2.3. When merging 2.3 to 2.7, all 2.3...3.0 changes are still removed and 2.7 becomes the 2.3 docs.

At the moment, I have the feeling that a hard reset + force push is the only solution to this problem.

@stof do you may have a clue on how to fix this?

@wouterj wouterj added the bug label Apr 20, 2016
@lyrixx
Copy link
Member

lyrixx commented Apr 20, 2016

just push -f ; It will be much simpler for everyone

@xDaizu
Copy link
Contributor

xDaizu commented Apr 20, 2016

Git merge mistakes happen

https://twitter.com/xDaizu/status/722715391038988288

@wouterj
Copy link
Member Author

wouterj commented Apr 20, 2016

Fix it with a force push. Thanks for the quick feedback @lyrixx and @xDaizu!

@linaori
Copy link
Contributor

linaori commented Apr 21, 2016

For hose who arrive on this page after trying to contribute but having an out of sync branch, make sure to fetch from your remote and do a hard reset on the branch you're working on. I recommend you to only do this on the branches that are out of sync.

Note that if you reset a branch you are working on, you will lose all changes. Make sure to have stashed your changes away or prepare a patch to apply afterwards!

$ git fetch upstream
remote: Counting objects: 106, done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 106 (delta 66), reused 65 (delta 65), pack-reused 34
Receiving objects: 100% (106/106), 20.13 KiB | 0 bytes/s, done.
Resolving deltas: 100% (68/68), completed with 34 local objects.
From https://github.com/symfony/symfony-docs
 + 4712b10...bbec4cc 2.3        -> upstream/2.3  (forced update)
 + cf61d87...7b8b8aa 2.7        -> upstream/2.7  (forced update)
 + bb08698...5439c7a 2.8        -> upstream/2.8  (forced update)
 + bb08698...61b4cdd 3.0        -> upstream/3.0  (forced update)
 + ec7b299...f164fd8 master     -> upstream/master  (forced update)

And resetting the master branch afterwards

$ git reset --hard upstream/master
HEAD is now at f164fd8 Fix syntax error

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

No branches or pull requests

4 participants