Solved FreeBSD Git and GitHub: tutorials/links

vigole

Daemon

Reaction score: 1,453
Messages: 1,267

FreeBSD is moving ahead with using Git and GitHub for its source control. Some of us are new to the Git/GitHub, and we're going to have many questions and some confusion.
Please post your FreeBSD-related Git/GitHub tutorials/links, here. Thanks.

>>>[EDIT]: I'll edit this post to add your suggested links and your names (@username). Thanks for your contribution.

The FreeBSD Project on the GitHub:
https://github.com/freebsd

FreeBSD git wiki page:
https://wiki.freebsd.org/Git

FreeBSD git mailing list (freebsd-git):
http://lists.freebsd.org/mailman/listinfo/freebsd-git
freebsd-git@freebsd.org

Repositories:
The github repo: https://github.com/freebsd/freebsd.git
The new cgit beta repo: https://cgit-beta.freebsd.org/src.git

FreeBSD Manual Pages:
git(1), git-help(1), gitcli(7), gittutorial(7), gittutorial-2(7), gitglossary(7)

Git tutorial on Warner's Random Hacking Blog (Warner Losh)
http://bsdimp.blogspot.com/2020/09/freebsd-subversion-to-git-migration.html
http://bsdimp.blogspot.com/2020/10/freebsd-git-primer-for-users.html

Related threads in the Forums:
Thread using-git-on-freebsd-why-and-how.64898
Thread howto-build-a-jailed-git-repository.34878
Thread how-to-clone-the-git-repository-from-github.75736

How-To:
Digital Ocean: How To Install Git on FreeBSD 11.0:
https://www.digitalocean.com/community/tutorials/how-to-install-git-on-freebsd-11-0

Misc. links:
Git Reference: https://git-scm.com/docs
Git Cheat Sheets: https://training.github.com/
GitHub Licensing a repository: https://docs.github.com/en/free-pro...archiving-repositories/licensing-a-repository

Additional Links contributed by Forums' members (Thanks!)
scottro : https://srobb.net/fbsdgit.html
Cthulhux : Support for Subversion clients
olli@ : Thread freebsd-git-and-github-tutorials-links.77242/#post-480520
 
Last edited:

Cthulhux

Well-Known Member

Reaction score: 190
Messages: 365

Some of us are new to the Git/GitHub, and we're going to have many questions and some confusion.

Yes, including the one relevant question:
I had read Warner's blog where he stated that losing the $Id$ feature is adequate because the alternative would be to not attract new developers who don't want to learn Subversion. When exactly has the FreeBSD team lost its drive to primarily care about technical merits?
 

ekvz

Well-Known Member

Reaction score: 278
Messages: 431

Yes, including the one relevant question:
I had read Warner's blog where he stated that losing the $Id$ feature is adequate because the alternative would be to not attract new developers who don't want to learn Subversion. When exactly has the FreeBSD team lost its drive to primarily care about technical merits?

While i think you have a point i somewhat understand them. It's pretty hard to avoid git these days and playing hardball on the issue really comes with a lot of drawbacks. Don't get me wrong, i don't like git and even less how it (especially github) is becoming (or rather has become) a monoculture but plain and simple pragmatism might really be not the worst choice here.
 

Cthulhux

Well-Known Member

Reaction score: 190
Messages: 365

Plain and simple pragmatism is exactly what makes a good operating system.

If I want to contribute to a project, I'll have to use its toolset. If I don't want to learn a new toolset, I shouldn't even consider contributing to that project.
An operating system is a complex thing that requires anyone who contributes to learn new stuff every day. And now they cannot even be bothered to type "svn" instead of "git"? Honestly, which kind of developers does this mean to attract?
 

ekvz

Well-Known Member

Reaction score: 278
Messages: 431

If I want to contribute to a project

That's exactly what the choice of svn vs. git might influence. I also think it's stupid but that sadly has zero effect on the way people act and in the end contributions is what makes projects move forward.
 

Cthulhux

Well-Known Member

Reaction score: 190
Messages: 365

contributions is what makes projects move forward.

As I stated in my edited reply above: If the contributors cannot be bothered to get used to (at least) three SVN commands (co, ci, up - feel free to add whatever else you think is relevant), how much could they contribute to an operating system?
 

ekvz

Well-Known Member

Reaction score: 278
Messages: 431

As I stated in my edited reply above: If the contributors cannot be bothered to get used to three SVN commands, how much could they contribute to an operating system?

That's a valid question which i obviously can't answer on a general level. Personally i've seen it the other way around though. I don't like git very much and having to go through the whole pull request procedure makes me think twice if i don't just keep those fixes i've written to myself and often times that's just what i do. Go figure.
 
OP
vigole

vigole

Daemon

Reaction score: 1,453
Messages: 1,267

My position is now we have to adapt our workflow to the new system. Learning, teaching and sharing our best practice/tips/tricks to each other.
PS. Git/GitHub? I don't like it. I recently spent a lot of time learning SVN. But it's over.
[EDIT] Please don't forget to share your tutorial links. I'll add them to the first post and will mention your names. Thanks.
 

ekvz

Well-Known Member

Reaction score: 278
Messages: 431

The only thing in relation to git that would really interest me is a solution to setup two-way sync with fossil. That would be neat but from what i read sadly also (almost?) impossible.
 

ekvz

Well-Known Member

Reaction score: 278
Messages: 431

You'll need shell scripts:

Admittedly, one-way sync to GitHub is surprisingly easy.

Wow, thanks. Now this is interesting. I would not have expected the official documentation to be of much use after the page on one way sync pretty much said "two way is impossible". Guess i'll have to play around with this a bit. Having my stuff available on github while not having to use it myself is pretty tempting.
 

Cthulhux

Well-Known Member

Reaction score: 190
Messages: 365

I would not have expected the official documentation to be of much use after the page on one way sync pretty much said "two way is impossible".

That happens when a large documentation is maintained on too many pages. ;)

I'll send you a PM with further details so we can keep this topic on topic. :)
 

olli@

Daemon
Developer

Reaction score: 1,252
Messages: 1,140

A few real-world examples that might be useful …
It has already been mentioned that you can use svnlite(1) to check out things from GitHub. It’s in FreeBSD’s base system, so it works out of the box, without installing any additional software.

To check out the latest source tree of stable/12 as /usr/src:
Code:
cd /usr
rm -r src
svnlite co https://github.com/freebsd/freebsd/branches/stable/12 src

Similarly, the command for 12.1-RELEASE is:
Code:
svnlite co https://github.com/freebsd/freebsd/branches/release/12.1.0 src

This one checks out HEAD a.k.a. -current:
Code:
svnlite co https://github.com/freebsd/freebsd/trunk src
In all cases, the last word on the command line gives the name of the target directory, in this case it’s “src”. If you don’t intend to perform further subversion actions afterwards (e.g. if you just want to “build world”), you can remove the .svn subdirectory after the checkout, which will cut the used space in half.

Of course, you can also check out the ports collection (this takes a very long time, though):
Code:
svnlite co https://github.com/freebsd/freebsd-ports/trunk ports
 

drhowarddrfine

Son of Beastie

Reaction score: 2,340
Messages: 4,306

Warner did outline some problems that git fixes, which he considers significant, but he also mentioned some things we lose. At first, this switch to git bothered me quite a bit as I likened it to bandwagon jumping and following popular trends. If I were to go to some major software project and they used fossil, I certainly wouldn't be concerned with that and just use fossil. But if the problems solved by using git overrides the problems it causes, it doesn't bother me as much but I'm still bothered.

I see this far too often in the web world. That's why everyone wants React because...because...well...Facebook uses it so we gotta have it too!
 
Top