Working with Git

Rainer Müller raimue at macports.org
Thu Oct 6 06:57:34 PDT 2016


On 2016-10-06 14:28, Ryan Schmidt wrote:
> If there are easy ways to rewrite the history of a pull request, by all means, let's suggest the user do that, and provide instructions for how to do so. I have no idea how to do it.

You can rewrite the source branch of a pull request in any way you want.
You can use 'git commit --amend' to add something to the last commit, or
you can do a 'git rebase -i' to change specific commits further down in
the history in any way you want.

After doing such changes to the branch history, git would reject a
normal push to the branch as it not only appends new commits at the top
of the branch. Therefore this will require a 'git push --force' to make
the branch look exactly like the reworked version.

Rainer


More information about the macports-dev mailing list