Contributing to macports using your own git fork&clone in combination with using 'port self update'

Gerben Wierda gerben.wierda at rna.nl
Sat Oct 23 10:43:16 UTC 2021


I have a local clone of a fork of GitHub/macports/macports-ports. This clone is used as repo by my port command. I have a fork&clone so I can contribute.

When I want to update macports itself, the command is ‘port self update’. But ‘port selfupdate’ also uses rsync to update my ports tree and that interferes with using git to stay in sync with upstream/master.

The way I can update my ports tree using git is:

# Updating the master of my fork&clone from the master of the original:

git checkout master			# Go to branch master in my local clone
git pull upstream master		# Update my local clone master from the master of the remote upstream
					# (overwrites my local master with remote github/macports/master)
git reset --hard upstream/master	# Resets index and working tree of local clone/master from remote upstream
git push origin master --force  	# Push local clone (~/MacPortsDev/macports-ports) master back
					# to my own remote fork (github/gctwnl/macports-ports)
					# NOTE: this closes all open pull-requests!
					# username: gctwnl
					# password: GitHub Token (in BitWarden)
portindex				# Tell macports to use this tree and update the macports index

Is there a way to do selfupdate on the base system only without messing with the ports tree, so the base system only? Or should I just run ‘port selfupdate’ and then use the above to do it again for the ports tree?

Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>)
R&A Enterprise Architecture <https://ea.rna.nl/> (main site)
Book: Chess and the Art of Enterprise Architecture <https://ea.rna.nl/the-book/>
Book: Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20211023/1bcf2e65/attachment.htm>


More information about the macports-users mailing list