should i use github / git regularly
i just hop from building one project to another and many people told me that i should add all my projects to github
is it really that important, i have a github account but i have never done anything with it
40 Replies
you should use git regularly yes
github probably too, but git definitely
it's a skill that will be expected of you if you get a job in the industry, it helps you keep track of changes you made to your solo projects, offers a backup of your code, lets you revert to earlier working versions of your code
okay
Your GitHub account can sort of function like a portfolio since it will house the code for your projects.
Also iirc you are doing odin project and it should've told you good practices to follow when using git like when to commit and commit message conventions
So keep an eye on that too
also, git is the only tool or language I can pretty much guarantee you'll be using in a professional environment
you can also look into gitlab or other alternatives if you are not a fan of Microsoft
or just self-host a remote git repo on a server with ssh enabled
that's what I do now
harder to use it as portfolio if you do that
but it works
Should you use Git? Absolutely.
Should you use Github? Probably, as that's the most popular way to share git repos. But if it's just for you then you can self-host or use another Git provider.
How does self hosting work. Did you need to write custom code for the server for merge, rebase, branch protection etc or are there just open source solutions that you can easily set up
you make a folder, then inside set up a repo with
git init --bare iirc
it's just the git part of course, but that's all I need as a solo dev and all you need in a small team too
though iirc you can selfhost gitlab in docker? I might be misrememberinghttps://git-scm.com/book/en/v2/Git-on-the-Server-Getting-Git-on-a-Server
From the official git docs 😉
ohkayy
If you have a server of your own and are comfortable with the command line and setting it all up, it's pretty good. But it takes a lot of work to make it public. If you're not comfortable doing that github/gitlab/etc would be a better option.
Or, of course, you could use it as an excuse reason to learn server management lol
do not make your own git and make it public if you dont know what you are doing
Oh didn't know git had their own thing for it
☝️
git is intended to be decentralized
folks always think that github made git, but afaik git was an opensource project long before github was a thing and always intended to use on its own
git is it's own thing. everything is a front-end for git.
github is just the most popular online host for git repositories
Yeppers. Github came from people not wanting to do it themselves. Not the other way around
just like everything is a frontend for ffmpeg ...
Github/bucket/lab/etc are all PaaS for git
and tbh, I get it, cause there's a lot of benefits to having that frontend for a team, especially stuff like merge requests and running ci/cd stuff, but it's totally viable to set up a locally hosted thing too. If you already have the server and a tiny bit of linux console knowledge, it literally takes 2 minutes
Git was designed b/c Linus Torvalds didn't like the options of the mid-aughts for decentralized version control when he was working on linux
-# IIRC
mercurial was the new one back then, and he hated it
with good reasons, from what i heard ... and it didnt do what he needed
which, fucking fair. SVN sucked
CVS was even worse
wait, wasnt it mercurial?
i heard that svn sucks, but never tried it personally
Git was created in '05 b/c Subversion sucked 🍑
okay, it was svn ... i had in mind it was mercurial
According to Wikipedia both Git and Mercurial were '05
I used SVN for a while at work, and it was a nightmare compared to git
SVN was '00
So as to not derail the question:
https://discord.com/channels/436251713830125568/1393236531484954726
so if, git is like emails, github is like google gmail?
Sorta kinda but not really
Gmail is an email provider that's locked to gmail. You can't take your gmail account and use it for yahoo mail—they're two different providers
It's more like git is your mobile service provider and github is your mobile phone. You can swap out your Pixel for an iPhone while still having the same service provider
Or, to continue with your email analogy, git is like your gmail account and github is Apple Mail and Gitlab is Outlook. Same email (git repo) different way of accessing it (Apple mail and Outlook)
ohh
as a beginner how much of git, should i bother with
🤔
https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History
this doesnt look beginners stuff even though it says basics😭
are you trying these out yourself in a git repo?
that's how they will stick. as for how much of these you would use right now is that I use oneline and patch mostly
nope
first i want to learn how to upload projects in github
you should try them
even if you can't upload projects yet the book should've told you how to install git and create a local repo with git init
yeah
is it fine if i keep my gmail hidden in github account
yeah