[Guide] Using Git to manage ports, source and documentation.

If you switch from latest to quarterly already installed ports may be ahead of quarterly ports. It wil disappear after some time.
It's all right. I'm actually switching, first of all, from ports (which I used to build from latest) to pkg and quarterly :).
Doing so because of the downside of building ports from latest tree: Synth rebuilds a lot of stuff on each update, then gets stuck with one port (www/node in my case). I never cared if www/node existed, but lo, NOW it must be used to build Firefox :((((.
....So I'll be just fine with quarterly, given my ports get updated no oftener than that in any case. Then, if needed, I'll build some modified ports fr the corresponding quarterly tree. THAT type of flexibility is exactly what I always needed.
 
I was just thinking... technically, latest is nothing else than quarterly + a number of updates/patches applied on top of it.
It is possible, then, to use git log command on latest tree to find the exact commit that corresponds to quarterly tree and git-checkout that particular one. Then, I suppose, it is possible to switch origin, isn't it?...
But then again, just cloning quarterly is a single step...
 
… technically, latest is nothing else than quarterly + a number of updates/patches applied on top of it. …

I think I get where you're going, but conceptually it's probably more useful to view e.g. <https://github.com/freebsd/freebsd-ports/tree/2022Q1> "… 515 commits ahead, 5859 commits behind main." at the time of writing.

Postscript: might some of this be better in a normal topic (non-moderated), instead of a moderated guide?
 
Did you do a shallow clone?
Must be. Simple git clone $remote_repo /usr/ports into empty /usr/ports fixed it for me. And probably this IS worth mentioning in this discussion under the topic of "Using Git to manage ports...". I don't remember how and why I ended up having a shallow clone, must have followed some advise for some reason I don't remember... I wasn't interested so much in Git, as I was in getting the source tree to work with ... too bad :)
 
… I don't remember how and why I ended up having a shallow clone, must have followed some advise for some reason I don't remember …

A year or so ago, there were various recommendations to go shallow.

 
Kindly extend such note to using it for portdowngrade without change to entire ports tree. I am aware that there a similar efforts in this forum.

Back in the days, one would pull only a version/revision of a port with the portdowngrade pkg and easily downgrade a pkg. Today, using the git command can set other ports back among other things.
 
Back
Top