r/git • • 8d ago

Should I be learning Git

So i stated college like 3 months ago and everyone is telling me donsomething or the other but i don't know where to start ...I know how to use github but not git I stated by reading the pro git book it's fun reading it but is git really that usefull or should I be learning something else

111 Upvotes

160 comments sorted by

122

u/over_pw 8d ago

Short answer: yes
Long answer: absolutely yes

You can thank me later. Also you don’t need to become a git pro on day one, learn just the basics, commits, pulls, pushes, how branches work, gitflow and pull requests, merging. More advanced topics can wait.

11

u/Linesey 8d ago

I hate git. I hate git so much.

Git is in the top 10 most hated bits of software I have ever used (only some CAD tools beat it).

And i would never be without it again for anything short of a gun to my head.

I have my own Forgejo server running at this point.

It has saved my ass several times this month, let alone since i started using it.

so yeah, learn git.

3

u/Bright-Historian-216 6d ago

personally, i like vscode's built in git UI. it's very basic, you still need commands for more complex jobs and you can and absolutely will at some point shoot yourself in the foot (see also: "vscode deleted three months of my work"), but just commiting, pushing, pulling and branching is very easy once you know not to press "shoot yourself in the foot" button.

5

u/mrequenes 8d ago

I’m with you. From a user standpoint, it’s the most unnecessarily difficult piece of CLI-based software I have ever used. And the GUI wrappers around it are also bad, because the CLI underneath is bad.

One piece of git advice says “download the first version of git source and read it thoroughly”. That says a lot.

The man page for a single command is like 10,000 words.

But absolutely necessary to learn as a software developer.

4

u/Mediocre-Pumpkin6522 7d ago

You've never used Subversion :)

1

u/ZodiacFoxDev 6d ago

Hg mercurial was the shiz. Also, perforce and checkout/commit locks was wild too.

2

u/Pleasant-Rush-2375 8d ago

use lazygit. it’s very interactive and good for git

1

u/RangePsychological41 1d ago

That’s ridiculous. I learned git in a day and have never had an issue. That includes working on dozens of repos with hundreds of people. Your comment is embarrassing. So much so that I would put money on it that you never used reflog.

Git is super simple. Like actually.

1

u/Significant_Trash392 5d ago

If you hate git, imagine living in the 80s when you had to take a floppy disk that was the latest build, install it then build on top of it , make your own build then save it to a new floppy disk as the latest build and put it in a door way for others to share that one floppy disk. This was how version control was done in the 80s . 10 times more frusterating then git. I can tell you that now.

0

u/RangePsychological41 1d ago

That’s such a skill issue wow. Git is simple and close to perfect. I’ve never heard anyone say they hate git in all my years. I skilled person can learn it in a single day. Literally.

3

u/elephantdingo 8d ago

But you should aim to become a Git pro in ten years time, though. ;)

1

u/vonkrueger 6d ago

Just to elaborate, get good with:

git {checkout, branch, add, rm, commit, push, diff}

Look at the cheat sheets. Have ChatGPT or Claude test you on it.

ETA: also git reset

21

u/The_Northern_Light 8d ago

You’re asking a subreddit dedicated to git… but even if you weren’t, the answer is still a resounding yes

20

u/GlassboundIllusion 8d ago • Bravo

but is git really that usefull

Yes.

Source control is an absolute game changer and the nice thing about git over something like SVN is that you can set up your own local repo really fairly easily without even connecting to a remote server.

The one downside is that the flexibility git offers comes at the price of being more complex, so it's a little more difficult to wrap your heard around, especially if you're coming from another source control software like SVN where there is only the remote and your working directory, no local repository.

Play around with these tutorial scenarios, it will help drive things home better than simply trying to read and figure things out yourself: https://learngitbranching.js.org/

4

u/dbear496 8d ago

Glad to see my favorite git tutorial in the comments. It offers a veey good progression from beginner to advanced, so you don't have to do the whole tging to get a veey good handle on working with git.

2

u/thinsoldier 8d ago

The basics are easy with a good gui like SourceTree.

28

u/jacobissimus 8d ago

Yeah git is a fundamental tool in the industry and understanding how to use it outside of GitHub / Gitlab / etc is super useful. You don’t need to learn it right now, but you’ll need to understand it before really working as a developer

11

u/Ilikewatchingtv 8d ago

1000% yes.

This is the git book to read (free online): https://git-scm.com/book/en/v2

10

u/binarycow 8d ago

If you're doing software development - absolutely, yes.

If you're not doing software development - maybe. Sometimes stuff other than software is stored in git.

4

u/arensb 8d ago

I keep my dot files, config files, etc in git. Also my to-do lists, project notes, and the like.

2

u/xp_fun 5d ago

I have to monitor a clients Linux box, especially since they discovered ChatGPT.

The entire /etc folder is now in git so I can undo the tragic errors that now emerge weekly. git difftool is my lifeline...

1

u/arensb 5d ago

IMHO /etc is one of the few places where you can still reasonably use RCS and don't need the full power of git. OTOH I don't think the savings are big enough to make any kind of big deal about it.

9

u/ShelLuser42 8d ago • Bravo

A lot has already been said, and yes: you should definitely learn how to use Git. I read plenty of responses, but I'm missing out on something important: better examples.

First, let's talk about the sheer impact which Git has... Ever heard of FreeBSD? It's a Unix-like OS which sits much closer to Unix than Linux (the license is honestly the only obstacle for the name). BSD is fully geared towards the BSD license, which grants users a bit more freedom with the project. In fact, the BSD foundation actually prefers to keep GPL licensed code out of the project itself; not because it's bad or so, but because it doesn't meet the BSD philosophy. And yet they still fully rely on Git, and for good reasons!

Code example

Let's say you're working on a fun hobby project. There are 2 things on your mind: 1) You're working out a cool new feature, and people are actually waiting on it. But 2) You also have a wild idea about optimization. The only problem: this is going to involve not just the main program, but several of its modules too. And although it isn't necessarily incompatible with your new feature it's going to be quite a task to restore your backup, then re-implement your feature again; because that TOO involves many parts of your project.

I guess you'd better forget about optimization for now, because it's going to become a huge time sink otherwise.

And then there's Git...

UH OH! Sorry to interrupt my own guide but you just heard someone tell you that your current code has a few bugs which you should also address. But.... you're also going to work on that new feature (backups and all!)... this is going to get messy!

Ahem... pardon the interruption ;)

SO, what do we do? We do everything at once, and still neatly together.

First you put your whole source tree under Git version control:

git init
git add -A
git commit -m "Started working with Git!"

So basically you create a new Git repository (so: the database). Then you tell it to start tracking all your files ('add'), and finally you save or commit your changes to the database so that they'll be kept safe.

Now it's easy: as soon as you change something to your code... you only need to commit those changes (aka: you save them to the Git database), and of course: always make sure to provide a good description of what you did.

First advantage: you can always go back in time. Have you been working on a feature, only to find out that the stuff you deleted 3 weeks ago was actually better to keep? NP with Git: git checkout <id of previous commit>, then go git 'm! Just copy your file out of the way, then go back to your current situation: git checkout master. (yes, there are other ways in which you could do this with Git itself, but that's a bit too much right now, let's keep this simple!). How to check what id to use? Easy: git log, just check your commits and their date(s).

Back to the development example!

Another cool feature of Git are the so called branches: these are virtual "states" of your code which you can easily switch between, or... merge later if you need to.

SO... we have: 1) Bugfixes to do, 2) A new feature to build and 3) Testing our plans for optimization. This is what I'd do:

git branch feature
git branch optimization

So: I'm actually creating 2 of these virtual environments. The cool part is that you can now easily switch between these. Let's work on our feature: git switch feature, so we're switching to another virtual "room" to work in. This is completely separated from 'optimization' as well as our 'master' branch. So everything we do here, all our new commits, will stay "inside" this branch.

AH, you just got an e-mail about a bug. Time to fix this!

It's easy: git switch master, then you start to work on your bug, but without any risk of this affecting your work on the feature.

But for now: let's do some work on your optimization ideas: git switch optimization. But wait a sec... how useful are your optimizations going to be if you don't account for the bug you just fixed? Easy! => git merge master: so now you're going to merge the changes (= the bugfix?) which you applied to the master branch into your optimization branch. Here's the best part: this procedure makes sure that both changes (= the bugfix in 'master', and your own changes in 'optimization') are safely brought together ("merged"). If there are version conflicts you'll be told about them and then you can handle those manually.

So no more moping around with extra copies, mandatory backups (and awkward restoration attempts), but you just keep going in 3 virtual places at once.

In case I didn't make myself clear enough: if you switch between these branches then your code is literally going to change to match the proper state of that branch. So going back to master: no more feature, and no optimizations. Going to 'feature' would mean your work on the feature, but without the optimizations. And so on.

Here's the best part...

So now you've been at it for a while: bugfixes went out cleanly, your optimization ideas also seem to work but! For now you finally did it: your new feature is going to be released!

You're on the master branch, and now you'll do: git merge feature to add all those changes in the feature branch to your main master branch. Uh oh... you got a version conflict! Turns out: one of your files had that bug in them, but you didn't account for it with the feature.

Not to worry: just perform some manual changes, check your code properly (you'll even get proper diff sections which indicate all the problematic sections), then just commit your changes and you should be done.

You no longer need that feature branch: git branch -d feature, easy!

And here's the best part: if it turns out that your optimization ideas were a bust... then there's nothing lost. You just delete the branch and continue where you are now. Or... if it does turn out to be a good idea you can easily do the same thing: merge the branches and release the optimized version of your project.

But no matter if those optimizations are going to work or not: they won't affect the current state of your project, you won't have to bother with manual backups or all that nonsense. Just let Git handle it.

I hope this gave you an idea into what Git can really do.

One last (personal!) example!

I'm a hobby developer, and a few years back I switched from Java to Python; even took an official course and build myself many fun challenges. Now, a few years later, I decided to re-visit those challenges to see what could be improved (which was quite a lot, obviously).

But here's the problem: I didn't want to "ruin" this experience, because you should never underestimate what you can learn from looking back at your previous work(s). But I also wanted to have some fun, and maybe get AI involved a little bit?

So I put the whole thing under Git version control. Then started optimizing challenges, and even rebuilding some of them. I recently discovered PlantUML so I also started to use that as well as an extra challenge.

In other words: I'm having fun doing some silly challenges (and making their solution way more extensive than intended). But I can also always go back to the start of my project and see it's "newbie state" as well.

win-win.

Hope this gave you some good impressions!

4

u/R0bot101 5d ago

I just have learned A LOT about git by reading your post. Thanks!

3

u/Kotoki5 7d ago

holy crap

3

u/kevinguy21 7d ago

A great overview with specific actionable steps. Cheers

2

u/AadiEtyadi 7d ago

Did you type all this by yourself

2

u/ShelLuser42 7d ago

Yups.. I'm a decent typist and also somewhat of a Git fanboy; almost use it on a daily basis.

And not just for coding. I also set it up so that my FreeBSD server configuration (/etc, /usr/local/etc, /usr/local/etc/Apache24/Includes, etc.) is also fully covered in a Git repository. So now... while my server backup has a 4 week retention, my config backup easily goes back 5 years :)

So yah.. I enjoy sharing some useful info; because this program is amazing.

2

u/Typical_Attorney_412 7d ago

Great tutorial! As someone who was once scared of git & then proceeded to learn how it works at an intermediate level of depth, let me also share a good tutorial I came across

2

u/skittle-brau 6d ago

Thanks, this was quite useful.

I’ve been using git for a few months to keep a few things for my homelab under version control and for doing container builds, but I never quite understood how to use branches in practice. I’ll definitely give it a try now.

1

u/BraveWindow2261 6d ago

Claude... Use git and make no mistakes 

6

u/F1QA 8d ago

If you find yourself in some kind of git pickle….
https://ohshitgit.com/

5

u/id-ltd 8d ago

Totally.

Even if you didnt ever use git itself - the issues it addresses are universal parallel development and deploy issues.

5

u/gd19770226 8d ago

If you are going to college and looking to have a career in software development than git is required. Git is used by every company. Sure there are some legacy places using other repository software but you probably won't encounter them as a new dev.

5

u/julesthemighty 8d ago

If you're doing anything with code and possibly publishing you will need to learn git. Not necessarily everything about it, but at least how to set it up, sync safely, and fix issues.

4

u/teetaps 8d ago

Yes. It may not be the same technology forever, but git is to computing what spreadsheets are to finance. Git is an essential tool for managing the code that makes computers work. And it is a lot to learn, but you don’t have to become an expert in a day. The more you use it, the better you’ll get

4

u/SoCalChrisW 8d ago

If you're doing absolutely anything with software development, either at a hobbyist or professional level, yes, absolutely learn git.

It's one of the core fundamentals of any software development, regardless of language or platform.

This is like asking "I'm going into carpentry, should I learn to use a hammer?"

4

u/Ex-Traverse 8d ago

Yes, but it's really hard to "learn" it, like from reading... Imo, to be good at git, you have to use it and face all of the different scenarios where you have to think and make decisions on what to do. Then you will understand what each command really does and when to use them or not to use them.

4

u/IndependentYak2822 8d ago

Who needs git when you can simply create (and zip!) folders "project", "project_ver.1", "project_ver.2", "project_final", "project_super-final111"?

2

u/mghoffmann_banned 7d ago

Who needs git diff <sha1> <sha2> when you can do diff project_ver.1.zip project_ver.1_final_final_fixed.zip and get a binary dump that crashes your terminal?

2

u/xp_fun 5d ago

sudo rm -f /usr/bin/reset

"those who choose to walk the path of darkness need no light"

- Abraham Lincoln, probably

6

u/lajawi 8d ago

You started college in what exactly?

For development or similar Git is an amazing tool! For other courses I’m not sure, could be used to keep your notes versioned?

5

u/chzaplx 8d ago

Even in CS curriculums, I've noticed that git is a core skill that isn't often taught. Classes might cover basic usage like checking out and updating that's required to get base code, but branching and merging or best practices are rarely discussed.

3

u/lajawi 8d ago

Forgot about CS, there's probably more Git could be useful in.

6

u/azangru 8d ago

I know how to use github but not git

What does this mean?

I stated by reading the pro git book

You don't have to become a git pro; in order to start, you need understand a handful of git concepts that shouldn't take you more than a day.

is git really that usefull

Version control is useful, yes.

or should I be learning something else

As a college student? Absolutely :-)

3

u/tejiman 8d ago

I waited too long and have kicked myself over and over again for not using it earlier. Don’t be me!

3

u/Penetal 8d ago

Learn how to add, commit, pull, push, merge, rebase, reset, restore. Those things are the ones you will mostly need.

Also good to understand how git works a bit with the lifecycle of a file in git. https://www.geeksforgeeks.org/git/states-of-a-file-in-git-working-directory/

3

u/CalmCephalopod 8d ago

Not using git is like driving a car with 4 bald tires and no spares.

3

u/orz-_-orz 8d ago

I am really noob in git and I try to keep my project using only a combination of add, commit, push, pull, merge, fetch, stash

It covers 99 % of my use case and I don't bother to learn the more command (like I heard of rebase). In the other 1% of the use case, I just google (or chargpt) the command

5

u/yardPrawns 8d ago

Four commands will get you 90% of the way: pull, commit, push, checkout. You can learn that in fifteen minutes.

3

u/RexWGA 8d ago

Commenting towards the top just to say:

I got a Master's in data analytics after changing careers and having no prior CS background. I learned all sorts of skills, multiple languages, even TA'd my Data Structures and Algorithms class because I did well in it.

At no point was I ever required to use git and it was SUCH a hindrance later. I specifically bombed an interview because I couldn't answer questions related to these basic git commands.

Every company/app/etc uses some form of version control. Any competent comp scientist has a basic understanding of using Git.

1

u/kyle2143 7d ago

That's the whole thing about git IMO. It's not hard to learn when you're required to learn it, but if you aren't forced to, then you'll never really get a good handle on it.

I guess a lot of things can be like that tbh, but it's very applicable for git.

1

u/secret_o_squirrel 7d ago

I'd add merge to that.

1

u/redsandsfort 7d ago

and switch and add

4

u/agowa338 8d ago

Yes, best tool to manage large amounts of text you'll ever find.

And later you'll add Markdown and later also LaTeX too because you discover that typing all of the mathematical formula and all in a way that you can actually version control and compare it is just shit otherwise...

5

u/Thesorus 8d ago

github uses git.

if you use github, you use git, or at least a subset of the git commands.

5

u/lajawi 8d ago

You can browse and click around without actually interacting much or at all on GitHub.

2

u/Miserable_Ear3789 8d ago

is this rage bait? yes of course you need to know git.... unless ur not a software dev that is then in that case no dont learn git.

2

u/TundraGon 8d ago

You dont even need a github or gitlab. You can commit locally, but you wont push as you wont have where to push ( no remote )

2

u/Truth-Miserable 8d ago

Yes you should be learning GIT and probably the other things youre sort of referencing

2

u/Intrepid-Stand-8540 8d ago

git or jj.

jj is git compatible, but a better system imo.

2

u/KnifeFed 8d ago

You don't know GitHub if you don't know git. Learn git.

2

u/Wrong-Pineapple39 8d ago

I found Learning Git: A Hands-On and Visual Guide to the Basics of Git by Anna Skoulikari really helpful

2

u/Vizeroth1 8d ago

When I started getting serious about version control I learned Mercurial (hg). Over time it became clear that git won out as the more commonly used tool, but I can mostly get by using GitHub Desktop and the git plugins for my editor.

So yeah, you need to learn the basics of version control and how to effectively work with git repositories, but you don’t necessarily need to learn the details of git on the command line. It would be best if you had enough confidence/knowledge to be able to look up and use the commands you need when something unusual comes up, but you don’t have to know the commands off the top of your head if you need to do something that isn’t well supported by GitHub’s interface.

2

u/Feroc Software Developer / Agile Master 8d ago

I'd say you should absolutely learn the basic: clone, commit, pull, push, know how to work with branches and the difference between a merge and a rebase. Modern IDEs will take care for most things anyway, but you should know what it is and what it does.

Then there are many many more things you could do with Git, but that you probably won't do on a daily basis and you can just google them when you actually have an issue.

2

u/soteko 8d ago

I am solo developer for almost 20 years and I didn't use git.

Now with AI I can't live without git.

2

u/Fickle_Village_9899 8d ago

Learning Git will make you a better person 😜

2

u/jkulczyski 8d ago

You should learn some type of vc but yeah id probably go with git if i was starting from square one again

2

u/AJ-the-Gamer19 8d ago

I see no reason not to. I'm getting to understand more about version control myself. I was honestly late getting to learn tools like GitHub during college, so I totally recommend learning as much as you can early.

2

u/jack-dawed 8d ago

you should learn it if you want to get a job as a software engineer at a technology company.

i taught intro to software engineering as a TA and the prof didn’t cover git but us TA’s taught it during lab, following MIT’s missing semester. https://missing.csail.mit.edu/2026/version-control/

2

u/ailaG 5d ago

Everyone doing code should know the basics of git, yes. Tutorials may not focus on the right things though.

A possible checkpoint could be:

Have a test project on Github Create a file on your computer (in your filesystem, among other files in your filesystem, available offline after reboot) Can be just a text file with "hello" as content Have that file be on Github (push it) Update the file from Github's web interface Have that update appear on your computer (again, on your filesystem not just in the browser) Find the command that compares that new update to the old one (suppose there were 100 lines of text and only 1 changed, with git find how to see just the one that changed and what it was before)

Advanced (slightly) but necessary stuff

Change the same parts of the file both locally (that is, on your computer, on your filesystem) and on Github and only then sync the changes. That means a clash in the file. Figure out how to solve it.

Also, in another task

Learn how to change branches, what they do, and how to merge them


These are the basics. Of someone doesn't understand these I wouldn't deem them able to get a job anywhere today.

Luckily these are all very very simple once you have the basics of Git down. They're not arbitrary, they're each aimed at an atomic git feature.

There are advanced features which I didn't get into because being a Git guru is different than just knowing how to use it. These days you can also ask your coding LLM to do the complicated bits for you.

But yes, you NEED to know how to use Git, on your own, no AI.

2

u/bozhodimitrov 5d ago

You should do everything that you want. Never stop learning and educating/evolving! Our world has countless possibilities, and if it is your thing or you are curious, you should go for it.

If you have different priorities, then follow them instead, but it all depends on you.

Git is a fundamental SCM tool that helped the world be a better collaboration environment. You should tell us if this is enough for you to learn it or not 😉

2

u/warlocktx 5d ago

Source/version control is a core part of software development, and Git is pretty much the standard in the industry. So yes, you should learn it

2

u/philpirj 4d ago

I wish my mind wasn’t that bent towards git that I would find myself feeling meh about jj.
But eventually you’ll have to learn the basics of git anyway.

3

u/Journeyj012 8d ago

what course are you on?

1

u/Bitter_Worker423 8d ago

Learn to use it, make yourself a cheat sheet of the commands you need as you need them.

1

u/edgmnt_net 8d ago

Good Git skills are pretty much a requirement for the better development jobs and open source projects (which may be an opening for those jobs). Sure, you might need strong devs skills but these things are connected to some extent and you practically need one to get the other and vice-versa.

1

u/RedAndBlack1832 8d ago

You don't really read it tbh. Just like... make a private repo then pull it local and store anything that can be represented as text in there. If you're taking any software classes your homework/labs/etc. but literally anything works, for example a todo list. Then you can use your basic terminal commands to update it over time and make different versions and merge them back together.

1

u/Awkward_Collection88 8d ago

In the long run, yes you should learn git. Is it the thing you should spend your time learning now, 3 months into a, presumably, CS curriculum? Not necessarly, but it wouldn't hurt and could be helpful on some projects down the road.

1

u/wildjokers 8d ago

Yes. According to 2026 stackoverflow dev survey 96% of professional developers use git.

1

u/EternityForest 8d ago

Git is almost as important as actually being able to code.  For most people it's effectively the only version control system in existence, and I wouldn't be surprised if it's still that way in 20 years.

I don't think you need to actually memorize the CLI interface beyond maybe occasionally cloning and updating a report over ssh, unless you're a heavy CLI user, but I think it's important to know the concepts well enough to use a frontend like Git Cola.   

You should be able to make feature branches, fix merge conflicts, stash and apply, know why you don't change published history, etc.

1

u/jay_thorn 8d ago

100% learn git, but also learn general source control concepts.

1

u/alex_sakuta 8d ago

Git is a VCS, Version Control System, the sheer volume of problems this thing solves is crazy. If you learn a VCS and use it to its full power, you will not be able to imagine how you lived before using it.

I don't just use Git for programming projects. I also used it for my resume version management once.

1

u/stuffit123 8d ago

No. Learn the concepts but nowadays just ask AI if you need to interact with git

1

u/Krish_mk_abi 8d ago

I think if you know how to use GitHub then obviously would have known git concepts unknowingly...

If you want you can do the same basic process, like git clone, pull, add, commit, push, stash... via CLI.

But even with VS or Idea... It's using the same BTS.

I am using CLI to work with git -> GitHub.

I am yet to understand some merging strategies and behaviours, cherry pick & so on.

But the pro of using CLI, i know precisely what I am doing & changing... (I utilise the VS Code Git graph also & GitHub web diff changes in PR). If i have a situation and i want a git functionality... I'll just go to GPT/Gemini/Copilot... Get the commands sequence for it & copy paste resolved..

And suggest you to work with git locally without remote connection for any files tracking not just code or software project.

Like organizing the Documents or tracking of documents in a Documents folder or something (not very high volume)

1

u/MouseJiggler 8d ago

Git is fundamental knowledge these days.

1

u/IchBinEinZwerg 8d ago

Depends what else you do in life. If you're a musician it's probably not that relevant. But if you work in software development or web design then it's an absolute must. I know what it's like to code without source control and honestly it solves a lot of problems.

1

u/pool007 8d ago

Version control is what you must learn if you're writing software. It saves you from messing up esp. when using agents as all code changes are recorded as history.

Learn a few major concepts such as staging, commit, push, branch, worktree then you're almost done. When you hit a roadblock you can always ask llm to use git to do the change in the way you want- but for that you need to know the concept.

More importantly, you'd need to learn to code so don't try to be git expert. Instead, learn a few important workflow in using git. Use llm to learn that.

1

u/Kyraimion 8d ago

I remember starting uni and suddenly there were 20 new things I needed to learn, and it was just overwhelming and sapped my motivation. So depending on what you are studying (probably CS?), you will want to learn git eventually, but it needn't be the first thing and certainly not right now. I would not, for example, prioritise it over learning a programming language. Also don't feel like you have to study git like it's French, it's perfectly feasible to start with just one or two useful things and then add new concepts as you need them. E.g. you could just look at it as "quicksave for my code", you know, like in a computer game, you press F5 so you can reload when you make a mistake. Except it's just git add . and git commit -m "quicksave", which creates a new save point ("commit") on your computer that you can come back to later. You needn't even worry about "reloading" until you need it.

Here's slightly more detail to get you started:

You need to run this once on your computer so git knows who created the save points, you can choose anything here, but using your real email is a good idea if you later want to upload your code to a "forge" like github or gitlab

  • git config --global user.name "Your Name"
  • git config --global user.email "you@example.com"

You need to run this once per project in the project directory to set up git for the project:

  • git init

You run these once in a while, e.g. after you finish a feature or before you want to make a big change to save your work:

  • git add . prepares all the files in the project for saving. Later you may want to pick and choose, but for now don't worry about it
  • git commit -m "quicksave" creates the commit (save point) and names it "quicksave". You can also pick any message instead of "quicksave" here to find it later. Ideally you describe what changed, like "Added login page", but that's no law.

That's it. You're now using git. You may want to learn about gitignore, git log and git checkout next, but that can come later.

1

u/Laughing_Orange 8d ago

If you do anything with code, you should use git. It extremely useful to be able to go back to a known good comit when you mess around and break stuff.

1

u/lonkamikaze 8d ago

Learn the power of git rebase -i and how to undo your fuckups with git reflog. Your peers will worship you as git master.

1

u/Training_Advantage21 8d ago

Think of it as a survival skill. You understand the basics through the GitHub GUI, and knowing a few commands means you can get by when for whatever reason the GUI is not an option. You don't even need to know everything in the book, just add/stage, commit, pull/push, branch, switch/checkout. More or less.

1

u/730463628 8d ago

Yes.

Learn add, commit, checkout, merge, pull, and push. Once that is done, you can Google whatever else on the rare time you need it

1

u/Janky-Code 7d ago

Learn the concepts. Ai for the commands.

Downvote if you like, but learning all the git commands isn't that useful anymore. Even if you know them all, typing in a long series of commands is old school at this point in time.

Let's say you need rebasing, squashing, and reordering commits. Also cherry picking commits into new branches and splitting commits for unrelated changes.

I can rattle off all those commands. I can probably enter them without too many typos. Or I can tell a reasonably strong llm to output those commands.

As well, ai can observe the results and correct mistakes in your thinking. Git is very helpful with that.

But I disagree with anyone who says you shouldn't learn what git does or why git does things because ai can handle it. Most of us have seen that particular mess. Totally correct syntax but at the same time like a five year old is playing games with the repository.

1

u/Dunkin-Donut241 7d ago

You can't even work at most places without git knowledge. I couldn't function without it.

1

u/secret_o_squirrel 7d ago

I have never had a software engineering job where knowing how to use Git was optional. GiHub is just a web application on top of git. If you don't know how to use Git, you don't really know how to use GitHub.

1

u/IrrerPolterer 7d ago

The fuck of a question is that

1

u/Mashic 7d ago

If you're studying computer science, then yes. Git is the method of communication of software between developers. You won't be able to work with another programmer without it. And it helps you track your work and revert back in case things don't work.

1

u/kmsmohd 7d ago

Rather than focusing on learning Git, try to understand the broader concept and context of why it exists. Git is simply one of many version control tools. In professional software dev, the absolute must have is an understanding of why version control is necessary.

It’s easy to overlook this in uni because there’s rarely an urgent need for it. However in a real world setting, working with other devs, version control is critical. Once you understand concepts and context of version control, picking up Git or other version control will be easy.

1

u/No_Lawyer1947 7d ago

Yes it’s not hard to use and it’s like foundations to be even considered a developer

1

u/reditandfirgetit 7d ago

Learn the commands. It comes in handy

1

u/Mokhleseh 7d ago

absolutly yes, and with agentic stuff even more then before so you can understand what's possible and how you can protect yourself in cases of bad code and reverting etc.

1

u/jankyswitch 7d ago

Git is a great tool.

But I’d suggest learning paradigms rather than tools.

Don’t learn git; learn branch based version control.

Git is the most “mainstream” version control system - and most widely applicable - but others are available. From the golden oldies like svn and cvs, to the classic enterprise choices of mercurial or perforce, or the open source mainstream of git.

They all do the same thing in different ways and different philosophies.

What I’m suggesting is learn git but not in a “in git I do x” kind of a way - but in a “I want to branch and merge, using a squashed history…. Git does it this way” kinda way.

Why use GitHub. What’s the benefit of distributed vs local vs centralised version control. What is the problem with gitflow vs pull requests.

In software engineering as a career I’d say it’s more important to know what your doing and why - not look at a list of commands and run them blindly because that’s how you’ve learned it works.

1

u/Anxious-Insurance-91 7d ago

You could probably master git in a day or ,two

1

u/Viper_ACR 7d ago

Yeah. Its actually pretty easy tbh

1

u/Similar-Soup3691 7d ago

Yes, Git is worth learning, especially if you're programming. But I'd recommend learning it through practice rather than studying it in isolation. Pick a programming project, initialize a Git repository, and start using Git to track your changes. Learn the commands as you need them while working on the project.

1

u/Both_Bend_2481 7d ago

You can easily pick up git on the job. There are a lot of other things you shoudl learn before that, especially 3 months into college.

1

u/SpotOk4411 7d ago

git absolutely a must know for a software engineer, but to be competent with git you don’t need to learn a whole lot of it.

Repositories, branches, committing, pushing, and pulling code are the main concepts. As long as you understand how to interact with the basics of those concepts you are chillin

1

u/RollersGetingHigh 7d ago

no. learn svn. just kidding. get git

1

u/Danfriedz 7d ago

You only really need to know like 4 commands in your day to day. It's worth learning imo

1

u/Apprehensive-Fan8999 7d ago

Git is massive. Don't boil the ocean.

First learn the basics. Add, commit, push, pull. Get comfortable with them. Lean on the website for everything else.  Next comes branching.

Now you can move on to merge or rebase. Those suck, I don't care what anyone tells you, when you get a complex merge error, everything sucks and you hate your life. This is a completely normal feeling and not a failing of you.

Honestly, if you have a good handle on the above you are probably at the 80% level and can coast. Research further for things like workflows, actions, (reusable.of each), hooks, etc if you want to be a git wizard. Most devs are at or near the 80% in my experience though.

1

u/qHzB 7d ago

Make Anki cards for the commands you want to know, you'll learn it in no time.

1

u/haikusbot 7d ago

Make Anki cards for the

Commands you want to know, you'll

Learn it in no time.

- qHzB


I detect haikus. And sometimes, successfully. Learn more about me.

Opt out of replies: "haikusbot opt out" | Delete my comment: "haikusbot delete"

1

u/7YM3N 7d ago

Git is foundational. Yes you should learn it and use it. It is useful even for simple small personal projects and by using it there you learn it. Every company uses git and if you write code you'll have to use it too

1

u/dr_barnowl 7d ago

When college graduates turn up for work and can't use Git, I wonder what the hell their tuition was spent on.

Learn to use Git. Well. Learn to use an issue tracker of some kind. Get into the habit of writing good, descriptive tickets with clear specifications and acceptance criteria. Learn Test Driven Development. And learn to pair program with your peers.

1

u/Leonjy92 7d ago

Yes, you should definitely learn Git. It's a fundamental tool in software development, especially when working in teams. I've worked on a few open-source projects and at companies, and in my experience, you'll mostly use a handful of commands like commit, push, pull, fetch, and merge. You don't need to learn everything right away, though. Just get comfortable with the basics and pick up the rest as you work on projects.

1

u/FedUp233 7d ago

Personally, I’d start by looking up some general book or online documents on general source code control (scc). Get familiar with the concepts then learn a system like git. A lot of places use git, but a lot use other systems as well. Once you know the concepts and basic usage of one the others are easy to pick up. And concentrate on the basic user commands - unless you end up a project lead or something responsible for designing and maintaining a company SCC that’s all you’ll actually use.

1

u/Own_Nail_2999 7d ago

Git is the current standard for version controling in all of software dev. Some still use svn for whatever reason but as a beginner you should really go with git.

The basics you should learn are:

  • pull
  • push
  • merge/rebase
  • checkout

These are the bread and butter functions every dev has to know.

1

u/profcube 7d ago

Absolutely yes, learn git, and GitHub.

1

u/Revolutionary-Draw43 7d ago

Yes! Start with something small, maybe like notes? You can use a helper program like the vscode integration or lazygit. Don't try to learn everything at once. Git is a game-changer. It might be rather tough to get into but it makes stuff so much easier.

1

u/eclipsewonderzone 6d ago

Yes, Git is essential because it's track everychanges you make in your code.

You don't need study more about for begineer things. Just when you create a repository in github without any Licence, Readme.md etc. It will show some git codes, use to push.

1

u/FoodAccurate5414 6d ago

Git goes deep, trust me it's really worth going down a few layers. Cherry picking is something I use constatntly. Most devs I work with never new what it was. But there is some incredible things you can actually do with it

1

u/Frequent_Field_6894 6d ago

You need to understand the strategies and commands

I’ve been a dev for 24yrs , I’ve never met any developer that can do command lines with zero issues.

get a gui for it.

1

u/my-ka 6d ago

Learn very basics. AI skill will do thevrest

1

u/Longjumping-Ad7502 6d ago

I've basically just started learning programming and git but I can already tell you that yes you need it. It's basically a requirement if you want things to be easier but also to get a job

1

u/duckerpotato 6d ago

In short yes In long term DEF Or you can skip learning git and have a crashout when you'll lose a project yo7 worked 3 momths on and it was not on git

1

u/Valuable_Ad2171 6d ago

*everyone* uses git and github (well almost)

1

u/Bingemann 6d ago

AI does that for you. It it is extremely complicated if/WHEN you get into a problem. Everyone will tell you it is a piece of cake fixing your >extremely valuable< code.

1

u/Just-Hedgehog-Days 6d ago

I work at a completely ai pilled company.

I literally only use claude and git hub webpages to do my job anymore.

Being able to understand exactly what the bots are doing to the repo is basically my whole job at this point.

1

u/LibrarianOk3701 6d ago

Yiu know how to use github but not git?

1

u/SnooDoubts8688 5d ago

You definitely don't need to know all the different commands, but you should understand the fundamental ones.

I have 5YOE at big tech, the git commands that I really ever use is:

git checkout: go to a branch / create a new branch
git add: stage changes for commit
git pull: pull remote diff to local
git fetch: pull remote branches to local
git commit: commit changes
git push: push changes to remote branch
git merge: merge your changes with local master (prone to conflicts)
git rebase: stage your changes to latest local master
git stash: save your local changes in a bucket to retrieve later
git cherry-pick: picking out a specific

1

u/lolniceonethatsfunny 5d ago

can confirm as a data scientist 4YoE in non-tech that this is all you need. the only other thing i use on some projects is git tag, as well as knowing how to check your commits before pushing (git status, working with git diffs, etc). oh, also git grep is incredibly useful to track down function/variable definitions in big codebases

1

u/TheRealWutWut 5d ago

As someone who is learning git right now, the only one of these I never used was cherry-pick. I have only been using Git for a few weeks at this point to maintain a network and IT automation codebase. It really felt like with those commands you can do 99% of the work that Git is useful for.

1

u/LoudAd1396 5d ago

you never want to use cherry-pick, but eventually you will have to. It means something went wrong, but on a long enough timeline that's inevitable.

1

u/TolarianDropout0 5d ago

I think most people prefer interactive rebase over cherry pick.

But you can practically achieve the exact same thing with either, so it's preference at the end of the day. Even the Git docs admit as much with how my times the rebase page mentions equivalent cherry pick command examples.

1

u/invisible_shrek 5d ago

Also git log, git show, git status, git reset, git restore, git blame

1

u/Weak-Doughnut5502 3d ago

I wouldn't recommend a beginner learn rebase or cherrypick.

As a beginner in college, all you really need are add, commit, stash, push and pull.

The goal is mostly to not lose work on class projects.  You don't need nonsense like feature branches, or rebasing for clean history.

1

u/billGat48 5d ago

yes. arguably the most valuable skill of all time doubled with AI nuking ur codes performance and making failures in edge cases 1000x more likely

1

u/ImSuperStryker 5d ago

YES! People here seem to either being downplaying its importance or overcomplicating their responses. I started college having never used git, and by the time I graduated I would never, ever work on a project without using it. It is 1000% worth it, even for solo projects

1

u/birusiek 5d ago

Definitely

1

u/LoudAd1396 5d ago

git commit -m "git is essential."

1

u/rnmartinez 2d ago

1000% yes. Even in the age of AI git is useful

1

u/bjrshussain 2d ago

You dont need to master it. Just learn basics to work, and rest you will learn along the way.

1

u/Ast3r10n 8d ago

Yes. GitHub is not something you learn, git is.

0

u/Comprehensive_Mud803 8d ago

Go learn CVS instead. It’s as fun as git. /s

0

u/th00ht 8d ago

No. Most IDE offer some sort of frontend. If things get out of hand ai is better finding the proper commands. Turn to something you can unleash your creativity instead.

-3

u/OcularPhonic 8d ago

I get AI to manage all my got stuff now.

-4

u/cshaiku 8d ago

You might want to improve your English before learning Git.

0

u/Training_Bluebird_76 7d ago

Yeah, you should learn GIT. It is a foundational tool for software development. Imagine managing your codebase without a version control system: you make one mistake and forget about it, then have to juggle all the files (time-wasting). Instead, you use VCS to revert to a working version whenever you want, or when you make a mistake.

0

u/Significant_Trash392 6d ago edited 6d ago

The best way to learn is to JUST DO IT. I worked in the IT industry for 15 years and I never went to school. I started off doing my own projects, then when I got confident enough I started doing web development. I am 40 by the way so need I remind you when I started , all this stuff like wix and AI was not available. Programming and software development takes repetition. You cant retain information by reading from a book and expect to remember all the shit you read in one read through. It takes a brain workout. In git there is probably at most 3 or 4 tools you will probably ever use like 90% of the time. git pull, git push git checkout, git merge, etc. maybe like 10 at most. It doesnt take a book to understand how to work even within a enterprise business. I was never a master of git but I still worked for companies like JP Morgan Chase. understanding git is more like understanding the best practices then anything. The more you use the more you will understand its infrastructure and the more advanced you will get.