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

Release/v3.7.0 #424

Closed

Conversation

TonVanDenBroek
Copy link

Some more modifications foe OpenEXR 3.

@c-lipka
Copy link
Member

c-lipka commented Jul 10, 2021

Not sure why you opened another set of pull requests. Your earlier pull requests have already been merged.

Squash-merged, to be precise. A squash-merge is effectively an entirely new commit, that includes all the changes from a pull request. Such squash-merges are usually done to keep the change history simple, as they replace an arbitrarily long chain of commits with a single one.

The downside is that, if the author of the pull request created their commits in the original branch (in their own copy of the repo), their copy is then out of sync with the "upstream" repo - which, as I only now realize, is what must have happened in your case, and which might have thrown you off and make you think something didn't quite work with your pull requests.


To avoid this problem in the future, it is good practice to use separate dedicated branches to prepare pull requests; those can be deleted later once the pull request has been merged and the branch is no longer needed. For example, to prepare a pull request to fix some hypothetical GitHub issue 42 in POV-Ray v3.8.0, you might create a new branch bugfix_42_v380 from release/v3.8.0, commit your changes to bugfix_42_v380, and then submit a pull request for your branch bugfix_42_v380 vs. the official branch release/v3.8.0.

This also has the advantage that you could (if you were so inclined) already start working on some other unrelated issue without messing up the pull request for issue 4711.

This is in part on me, as I could have spotted the issue when reviewing your pull request. I'll try to pay more attention to such details in the future.


To rectify the situation now that it has already happened, and get the two branches back in a clean state, my recommendation would be to create a new(!) local clone of the POV-Ray/povray repository, make sure it is up to date, and then force-push the problematic branches to your own GitHub repo, using the following commands:

git remote add my_repo
git push --force my_repo release/v3.7.0
git push --force my_repo release/v3.8.0

This should, in theory, discard the current history of release/v3.7.0 and release/v3.8.0 in your fork on GitHub, and overwrite it with the history from the local repo (which should match the official repo, by virtue of being a clone thereof).

If for some reason you want to keep your history of the individual changes you made, you can first create a new branch from your version of release/v3.7.0. Or you could rename the release/v3.7.0 branch in your GitHub to something else before doing that magic git push, in which case you should be able to get away without the --force parameter.

Once you're done with that procedure, you can delete the local clone again.

@c-lipka c-lipka closed this Jul 10, 2021
@TonVanDenBroek
Copy link
Author

TonVanDenBroek commented Jul 12, 2021 via email

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

Successfully merging this pull request may close these issues.

2 participants