<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">This actually completed, but on <a href="http://GitHub.com" class="">GitHub.com</a> I still see:<div class=""><br class=""></div><div class=""><span style="caret-color: rgb(88, 96, 105); color: rgb(88, 96, 105); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 14px; background-color: rgb(250, 251, 252);" class="">This branch is 2 commits ahead, 343 commits behind macports:master.</span><br class=""><div><br class=""></div><div>In other words, any pull request will still be denied because it consists of multiple commits on a part instead of a single one.</div><div><br class=""></div><div>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.</div><div><br class=""></div><div>G</div><div><br class=""><blockquote type="cite" class=""><div class="">On 9 Jan 2020, at 22:41, Jeremy Lavergne <<a href="mailto:snc@macports.org" class="">snc@macports.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">If anyone else pushed between your fetch and push, you'll be out of date again.<br class=""><br class="">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):<br class=""><br class="">git pull --rebase --autostash && git push<br class=""><br class=""><br class=""><br class="">On 1/9/20 4:34 PM, Gerben Wierda wrote:<br class=""><blockquote type="cite" class="">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)<br class="">I have a macports-ports clone on GitHub which I use locally. I need a clone or I cannot create pull requests.<br class="">When I have to do a reset, I:<br class="">- save my changed files outside the git tree<br class="">- then:<br class=""># To reset the current reporsitory to what is in upstream (my repo is called 'local', upstream is called 'origin')<br class="">    git fetch origin<br class="">    git reset --hard origin/master<br class=""># I push the local store to my cloned repository on github:<br class="">    git push<br class="">After this, my repo on <a href="http://github.com" class="">github.com</a> <<a href="http://github.com" class="">http://github.com</a>> (gctwnl/macports-ports) and my local copy of my own repo are in sync with macports/macports-ports<br class="">Or so I thought. But I just tried this and I get:<br class="">albus:macports-ports sysbh$ git push<br class="">Username for '<a href="https://github.com':" class="">https://github.com':</a> <a href="mailto:gerben.wierda@rna.nl" class="">gerben.wierda@rna.nl</a> <<a href="mailto:gerben.wierda@rna.nl" class="">mailto:gerben.wierda@rna.nl</a>><br class="">Password for '<a href="https://gerben.wierda@rna.nl@github.com':" class="">https://gerben.wierda@rna.nl@github.com':</a><br class="">To <a href="https://github.com/gctwnl/macports-ports.git" class="">https://github.com/gctwnl/macports-ports.git</a><br class="">! [rejected] master -> master (non-fast-forward)<br class="">error: failed to push some refs to '<a href="https://github.com/gctwnl/macports-ports.git" class="">https://github.com/gctwnl/macports-ports.git</a>'<br class="">hint: Updates were rejected because the tip of your current branch is behind<br class="">hint: its remote counterpart. Integrate the remote changes (e.g.<br class="">hint: 'git pull ...') before pushing again.<br class="">hint: See the 'Note about fast-forwards' in 'git push --help' for details.<br class="">So, apparently my ‘reboot’ isn’t hard enough. What went wrong? How do I<br class="">- reset my clone (both local and on <a href="http://GitHub.com" class="">GitHub.com</a> <<a href="http://GitHub.com" class="">http://GitHub.com</a>>) to the current HEAD of the official repo in a way that /always/ works?<br class="">G<br class=""></blockquote></div></div></blockquote></div><br class=""></div></body></html>