Is this git handling of a problem on my macports-ports fork&clone OK?

Gerben Wierda gerben.wierda at rna.nl
Sat Feb 19 12:59:29 UTC 2022


I have my own fork&clone of macports-ports in case I want to do maintenance. Getting a clean local clone for me means:

# First, do an update of macports base only (does not update the ports tree):

sudo port selfupdate --no-sync

# 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!
portindex				# Tell macports to use this tree and update the macports index

Apparently, in the past UI have accidentally done some of this as root, so this failed because parts of the macports-ports clone were owned by root.

So, I did a chown -R on that tree and tried again, but now I get

albus:macports-ports sysbh$ git pull upstream master
From https://github.com/macports/macports-ports
 * branch                    master     -> FETCH_HEAD
Updating e0a3df02c73..eca5c1226ee
error: Your local changes to the following files would be overwritten by merge:
	_resources/port1.0/checks/implicit_function_declaration/macosx10.10.sdk.list
	_resources/port1.0/checks/implicit_function_declaration/macosx10.11.sdk.list
…
error: The following untracked working tree files would be overwritten by merge:
	aqua/qt5/files/patch-qtwebengine_gn_binary_path.diff
	comms/s710/files/dynamic_lookup-11.patch

So I tried to do 

git reset --hard upstream/master

and apparently this did work as another pull did nothing. But before I push that back to my own clone: have I done anything wrong? Is my local tree in order now?

Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>)
R&A IT Strategy <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/20220219/af67a3de/attachment.htm>


More information about the macports-users mailing list