This actually completed, but on GitHub.com I still see:

This branch is 2 commits ahead, 343 commits behind macports:master.

In other words, any pull request will still be denied because it consists of 
multiple commits on a part instead of a single one.

I understand that MacPorts wants to keep the official repository clean, but 
there are no instructions on how to proceed when your pull request is denied 
because you’ll end up with (forbidden) multiple commits. And so far, nothing 
works.

G

> On 9 Jan 2020, at 22:41, Jeremy Lavergne <s...@macports.org> wrote:
> 
> If anyone else pushed between your fetch and push, you'll be out of date 
> again.
> 
> Not entirely sure what your workflow is, but you a current git should let you 
> do an autostash on pull (which might help your situation):
> 
> git pull --rebase --autostash && git push
> 
> 
> 
> On 1/9/20 4:34 PM, Gerben Wierda wrote:
>> Given my absolute lack of decent git skills (and it’s just too complicated 
>> for a fast skill increase) I have the following setup (which so far worked)
>> I have a macports-ports clone on GitHub which I use locally. I need a clone 
>> or I cannot create pull requests.
>> When I have to do a reset, I:
>> - save my changed files outside the git tree
>> - then:
>> # To reset the current reporsitory to what is in upstream (my repo is called 
>> 'local', upstream is called 'origin')
>>    git fetch origin
>>    git reset --hard origin/master
>> # I push the local store to my cloned repository on github:
>>    git push
>> After this, my repo on github.com <http://github.com> 
>> (gctwnl/macports-ports) and my local copy of my own repo are in sync with 
>> macports/macports-ports
>> Or so I thought. But I just tried this and I get:
>> albus:macports-ports sysbh$ git push
>> Username for 'https://github.com': gerben.wie...@rna.nl 
>> <mailto:gerben.wie...@rna.nl>
>> Password for 'https://gerben.wie...@rna.nl@github.com':
>> To https://github.com/gctwnl/macports-ports.git
>> ! [rejected] master -> master (non-fast-forward)
>> error: failed to push some refs to 
>> 'https://github.com/gctwnl/macports-ports.git'
>> hint: Updates were rejected because the tip of your current branch is behind
>> hint: its remote counterpart. Integrate the remote changes (e.g.
>> hint: 'git pull ...') before pushing again.
>> hint: See the 'Note about fast-forwards' in 'git push --help' for details.
>> So, apparently my ‘reboot’ isn’t hard enough. What went wrong? How do I
>> - reset my clone (both local and on GitHub.com <http://GitHub.com>) to the 
>> current HEAD of the official repo in a way that /always/ works?
>> G

Reply via email to