How do I merge my own fork with updates from the main fork
Christopher Jones
jonesc at hep.phy.cam.ac.uk
Sat Aug 24 14:07:19 UTC 2019
Hi,
> On 24 Aug 2019, at 1:55 pm, Gerben Wierda <gerben.wierda at rna.nl> wrote:
>
> Thanks.
>
>> On 24 Aug 2019, at 12:40, Chris Jones <jonesc at hep.phy.cam.ac.uk <mailto:jonesc at hep.phy.cam.ac.uk>> wrote:
>>
>> I recommend changing [the setup] so the primary macports repo is called origin, and you call your fork something. Things tend to work more smoothly this way.
>
> OK. So how do I rename these? Or how should I have created them in the first place? I can of course throw everything away and start anew. At this point, I need to find out how to get back to a working situation.
You can rename remotes. See
git remote —help
>
>> If you have unstated changes, you have to stash them before rebasing.
>
> ’stash’ is just ‘move them out of the way’ or is it something git?
its way more than just moving them out the way. Mote like a temporary commit. again, see
git stash —help
cheers Chris
>
>> That is why I suggested to use
>>
>> sudo port sync
>>
>> as it handles all this for you. Under the hood it does
>>
>> git pull —rebase —autostash origin master
>>
>> assuming origin is the primary MacPorts repo.
>
> Aha.
>
> I have of course two repos:
>
> /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports <http://rsync.macports.org/macports/release/tarballs/ports>
> ~/MacPortsDev/macports-ports
>
> And my sources.conf says:
>
> file:///Users/sysbh/MacPortsDev/macports-ports <file:///Users/sysbh/MacPortsDev/macports-ports>
> rsync://rsync.macports.org/macports/release/tarballs/ports.tar <rsync://rsync.macports.org/macports/release/tarballs/ports.tar> [default]
>
> So that ~/MacPortsDev/macports-ports is the tree used for the port install etc. commands
>
>> B.t.w. Its very much bad practise to make new commits directly to the master branch of your own fork. You should keep your master clean and only pull into it from the primary macports master, using the commands I just sent around.
>
> Yeah, I understand. It was the current status though.
>
> I have been trying to follow instructions but I am trying to prevent to have to become a git expert (there is insufficient time for that available, such as studying a whole git book). Just knowing some basic recipes for actions/steps lets me concentrate on the actual stuff I want to do that is potentially contributing to ports.
>
> G
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20190824/8d128814/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1930 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20190824/8d128814/attachment.bin>
More information about the macports-users
mailing list