Thank you Michael and Mark, you have increased my understanding of git such that it now makes a bit more sense of what is going on. The many many git manpages I find hard to comprehend. (what does <tree-ish> supposed to mean?) On 19/06/2022 3:13 am, Mark Millard wrote:
(Deleting/moving directory trees from the likes of inside /usr/ports is a valid type of development operation.
I see. That makes sense.
"git -C /usr/ports pull" is basically a sequence ( I made the command explicit about /usr/ports ): # git -C /usr/ports fetch # git -C /usr/ports merge
The manpage mentions this.
The git fetch means that you have a full copy available locally...
... of the .git tree...
that you could check out into a directory tree...
... via 'git merge':
The git merge has to do with updating the local directory tree to deal with both already-changed local content and the fetched material.
Seems I had a misunderstanding of 'merge' and 'checkout'.
It is not the goal of this to do the likes of a "git -C /usr/ports reset --hard HEAD".
Ah-ha!
A question here is if you maintain any deliberate changes of your own in your tree. (Are you acting like a developer at all?)
I'm a mere mortal user... although I was once listed in the now non-existent FreeBSD 'Contributors' web page...
# git -C /usr/ports reset --hard HEAD would destroy any deliberate changes to things in your /usr/ports tree.
Bingo! This is what I'm after.
git is biased to on-going development and so expects to deal with differences being involved in the local directory tree. It is extra work to be sure no differences occur or to remove the differences when unintended ones show up. It is not automatic.
There ya go.. Thanks again, -andyf
