having trouble with pull requests

Joshua Root jmr at macports.org
Mon Jan 31 21:33:26 UTC 2022

On 2022-2-1 08:20 , Langer, Stephen A. (Fed) via macports-dev wrote:
> Hi --
> I submitted two new projects recently and with some help from Renee Otten was able to get them accepted.  Now I'd like to fix some bugs that showed up.
> The problem with the pull requests for the initial submission was that there were too many commits, and when I tried to combine them into one I was presented with a list of hundreds of commits that weren't mine (maybe I shouldn't have updated from upstream?)  In any case, I ended up with a whole bunch of extra commits on my master branch in the fork on github, and I don’t seem to be able to get rid of them.
> Now I'd like to create a pull request for the bug fixes.  So I went to my fork of macports-ports on github (github.com/snarkhunter/macports-ports) and updated it from macports.  On my computer, in the master branch of my clone of my github repository, I ran "git fetch" and "git pull".  I created a new branch "oofcanvas-1.0.2-take2" and added the modified Portfile to it, committed it, and pushed it to github.  Then going to https://github.com/snarkhunter/macports-ports/pull/new/oofcanvas-1.0.2-take2 I see that it's still says it's 19 commits ahead of macports:master.
> Why 19?  Shouldn't it just be the one commit, the one with the new Portfile?
> Are all the mistakes that I made in the initial submission baked into my fork?  Pmetzger advised me to start over, but it's not clear to me at which point I should start over.  Should I ditch my whole repository and create a new fork?  I tried making a new branch and a new single commit on that branch, making sure that the branch was from a clean copy of the master branch from macports, but that didn’t help.

You appear to have a bunch of merge commits added to your master branch. 
The easiest way to clean up, short of deleting the repo and starting 
from scratch, is probably to do an interactive rebase of all the commits 
after 06139ae7a4555b600d13254b3546553215db11cc (the parent of your first 

git rebase -i 06139ae7a4555b600d13254b3546553215db11cc

This will prompt you to choose what to do with each commit. If you drop 
all the errant merge commits, you should then be in a position to rebase 
on top of the upstream repo as per 

After that, creating new branches starting from master should work as 

- Josh

More information about the macports-dev mailing list