Working with Git

Russell Jones russell.jones at physics.ox.ac.uk
Fri Oct 7 07:01:05 PDT 2016



On 06/10/16 14:57, Rainer Müller wrote:
> 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
> _______________________________________________
> macports-dev mailing list
> macports-dev at lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/macports-dev
Though "git push --force" is potentially quite dangerous 
https://about.gitlab.com/2014/11/26/keeping-your-code-protected/

Russell


More information about the macports-dev mailing list