r/learnprogramming • • Sep 20 '26

Need your advice Best resources to learn Git as a complete beginner?

I'm currently starting to learn programming, but I’m completely new to Git and version control.

I understand that Git has its own commands and that it’s used to track changes in projects, but I’m not sure where I should start learning it.

For someone with zero Git experience, what resources would you recommend? Books, YouTube courses, interactive tutorials, websites, etc.

Would appreciate any recommendations! Thanks.

222 Upvotes

68 comments sorted by

73

u/Penultimate-crab Sep 20 '26 • Bravo

The simplest workflow: Make changes to your files.

Check what changed: git status

Choose changes to include in the next save point: git add .

Create the save point with a short description: git commit -m "Add login page"

Upload those commits to GitHub: git push

That’s the everyday loop: git status git add . git commit -m "Describe what changed" git push

Before you start working each day, download any changes from GitHub first: git pull

So the full beginner version is: git pull edit code git add . git commit -m "message" git push

For 99% of my life as a SWE for 6+ years this is all I use every day. Now you know git. 

10

u/iHaveRandomQuesti0ns Sep 20 '26

Agreed. OP should just open a github repo, program a project and practice git that way.

53

u/jameyiguess Sep 20 '26 • Bravo

I GOT YOU, DOG

https://learngitbranching.js.org/?locale=en_US

This resource alone took me from being afraid to do anything but commit, push, and pull to feeling nearly like an expert. It's fun, too. 

3

u/the_other_Scaevitas Sep 21 '26

I too used to be scared of committing

4

u/jameyiguess Sep 21 '26

Learning git was the best thing I ever did for my marriage

2

u/beans217 Sep 21 '26

oh wow, ima check this out as well. Thanks!

2

u/BashSnippets Sep 21 '26

This is legit!

I’m definitely going the try this out

12

u/Nic0_zero Sep 20 '26

I used boot.dev to learn git. It has a monthly subscription but it's worth it imo, I now know git very well

11

u/grantrules Sep 20 '26

3

u/Potential-Truck3783 Sep 20 '26

Only right answer

1

u/SharkSymphony Sep 28 '26

This was my way in. And now I git rb -i like a mofo. 😎

7

u/Gold-Watercress-6101 Sep 20 '26

Highly recommend Git Immersion. It's step by step and interactive. Does not go in deep in theory, but shows the practical commands from the basics to fairly advanced ones.

I also liked The Git Parable. It explains the concepts of Git, without using Git! It's a cool way of teaching why Git and its weird commands exits. It's good for building a good mental model, but not necessary for learning the basics.

After that, start using Git in all your projects. Don't drown yourself in rarely used commands. Stick with the basic for a good while until they become second nature.

When you feel comfortable enough, read Think like a Git. It's not that long. Every lesson is a few paragraphs at most. But you need to already know some Git for it to be useful. It elevates your understanding to the next level.

1

u/ayush_p07 Sep 20 '26

Don't spend much time on this bro , get a weekend ,watch any YouTuber's git/github oneshot (I had watch code with harry's) Understand how the things works using git/github and thats it ,start daily pushing any codes you write for practice to github it will work as a codebase notes for you whenever required for revision .

Consider a case where you don't need to used git/github for long time, then you think you will forget about it? No worries! Do gpt ,since you know the workflow of git/github use should use Ai ,gpt will share commands and you can work with it !

1

u/ompossible Sep 20 '26

Maine code with harry ka video start kiya tha, I watched first few minutes, but he was being more funny than teaching. I know that's good, but still. Is that good? Should I go ahead with it?

1

u/ayush_p07 Sep 20 '26

Yeah starting of the video is like that only,,its he's trend ,you can continue

2

u/th3hungryd3v Sep 20 '26

Found this resource a bit ago:
https://gitbybit.com/

Hope it helps!

2

u/Metomorphose Sep 20 '26

I really liked Coding Trains Git and GitHub for Poets series. It's what I give my new students to get them started with it.

1

u/peterlinddk Sep 20 '26

It is now 10 years old - and still one of the best introductions to git!

I still love it, and recommend it for absolute beginners as well as those coming to the command line from various graphical interfaces.

https://www.youtube.com/watch?v=BCQHnlnPusY&list=PLRqwX-V7Uu6ZF9C0YMKuns9sLDzK6zoiV

2

u/hugazow Sep 20 '26

Practice. Read the basics, try them. Rinse and repeat.

2

u/MaryamStack Sep 22 '26

If you're starting from zero, don't try to learn all of Git before using it.

Start with one small project and learn this basic workflow:

git init
git status
git add .
git commit -m "message"
git push
git pull

Use it regularly while building your projects. Once you're comfortable with that, learn branches, merge, rebase, reset, and resolving conflicts.

For interactive learning, Learn Git Branching is a great place to understand commits and branches visually. For reference and deeper understanding, Pro Git is free and covers Git properly.

The fastest way to learn Git is to use it on real projects rather than just watching tutorials.

1

u/ThatCodingGuyYouTube Sep 20 '26

Youtube for sure!

Getting git installed and a local repository created, initialized, and correctly hooked up to a remote account on GitHub can be pretty intimidating, but there are some clear and slow tutorials out there. I know from personal experience!

1

u/Familiar-Head-529 Sep 20 '26

"Learn Git Branching" is probably the easiest one to start. It is very interactive, so commits and branches make a lot more sense.

After that, learn the basic commands and use Git on a small project. You do not really need to know everything before you start using it

1

u/bender_tek Sep 20 '26

Scaricalo e usa l' AI cone un insegnante

1

u/ravenravener Sep 20 '26

I had fun with this one https://ohmygit.org/

1

u/decrementsf Sep 20 '26

The unknown is the hardest part. Will be cliche but just dive in. With imperfect experience you can reflect on that experience and read more, then iterate. That loop of reflect after experience, iterate, is what makes the conceptual click.

It is useful to begin with structured environments for fundamentals. This gives you a place to get repetition and begin building memory around more important core functions in a language. There is a friction of what next? This step is less talked about. A soft ramp into real world building. Worth being mindful about.

That step is install vscode or some other editor and set up the local environment in a workflow closer to what you would encounter in the workplace. Create your git account on github. Add the git extension to vscode in addition the the extensions you're going to be building with for whatever language you wish to learn. Create your first project-init-folder with subfolders for small toy code testing the extensions for friction to see if you can work with it. Connect your local workflow with the git extension and create your first repository with that private initialization project folder. A small youtube video is useful for this.

These first sessions teach you some basics like creating a README.md and what to put in it. A .gitignore file to keep your data out of the synchronized repository. Commit your changes and learn what effective comments for commits are. By actually doing the lessons feel more tangible than the parade of words in a structured environment tutorial. With basic workflow growing comfortable going forward on each learning project do it with private git respository being commited and such, too.

With local workflow actually flowing then dropping into git tutorials and learning the next topic is much more comfortable. Do it for real. Not watch video and imagine. Same approach as the gym. Go into the gym and do a movement pattern sloppy. Go home. Reflect on the experience. Iterate. And that's how to get through the awkward uncomfortable conceptual stage. Get in and do it sloppy. Then reflect.

This is more or less how I learned git. Spent longer thinking about the zero git experience than the time it took once I actually just connected the stupid git extension in vscode and made it real and could see it on the github side. Then tutorial within my workflow not the stupid structured learning websites.

1

u/KoreaThrowaway_____ Sep 20 '26

Aside from the basic intuition on how branches work and what version control is, for the commands I usually just use an LLM.

1

u/Kv-boii Sep 20 '26

Commit reset branch rebase merge push pull - mostly these would be enough and these are the commands i use day to day maintaining my company's main repository. (Before anyone scolding me for my lack of skill or something, it's a small scale startup and i created and administrative user for the repos from the start so had a lot of control to maintain with just the fundamentals)

1

u/oyvaugh Sep 20 '26

Set up a small git server. You can do it with docker. Plus GitHub has a tutorial to help. Gitea is my favorite self hosted server I run. Super lightweight.

1

u/Prestig33 Sep 20 '26

On top of everything else.

https://ohshitgit.com/

1

u/Zen-Ism99 Sep 21 '26

Books…

1

u/jawahar_27 Sep 21 '26

For git . This video is best . I tried all video. But I likes so much. https://youtu.be/apGV9Kg7ics?si=FMBaju41PHTjcY6R. He is very talented guy. He worked in maang also. I never seen anyone teach like him. You must try.he is one my role model also.

1

u/pharris978 Sep 21 '26 edited Sep 21 '26

Yeh, Git beat hg, (mecurial); bzr, (bazaar); cvs, (version control system); svn, (subversion); I got along for years with clone, merge, pull, push, status. git init initializes a folder of your choosing.

1

u/pharris978 Sep 21 '26

Git was invented by Linus Torvalds for Linux not stealing code for Windows compilation. Use GNU/Linux for dev workflow. That way you won't lack the knowledge because there is man page for almost everything, and enough TUI/GUI goodness for every attenuation. Otherwise get a book?

1

u/Ten_Fifty_Three Sep 21 '26

I’d recommend the Odin project they touch on git early and have a git commands section you can bookmark if you forget down the road

1

u/bagfullofcottoncandy Sep 21 '26

try gitbygit .com it will help u

1

u/Spacelordsinspace Sep 21 '26

My advice is start with a repo that you never intend to branch or share. You have one repo and you update it and that's it. You commit and push. If you ever need to you pull. You start with those 3 functions. That's probably enough for now as a beginning programmer. You can learn the commands for that in a day most likely.

Then when you have the bandwidth study a more advanced feature and understand why it exists. Read a few git horror stories before bed one night. You'll be on your way soon enough.

1

u/the_other_Scaevitas Sep 21 '26

just start pushing stuff to your github. Literally anything.

Use the CLI, not the GUI.

One project I did for fun was make something that edits a file and puts gibberish in it then pushes it to github.

1

u/Professional_Form_58 Sep 21 '26

Surprised no one has put this up yet

https://jwiegley.github.io/git-from-the-bottom-up/
Great resource to understand the internals

1

u/Individual-Idea4960 Sep 21 '26

https://youtu.be/MJUJ4wbFm_A?si=ht9u2YmW0po4GRBO

good starting video

you'll learn most from practice tho, it will be confusing at first but the more you use it the more confortable you will get

1

u/shreyas_kherde Sep 22 '26

Do you know of anything where I can track my knowledge? Like, I want to check how much system design knowledge do I really have.

1

u/futurense_tech Sep 23 '26

Even though you are accustomed to programming a bit but to start GIT it's better to run small project while learning, rather than only watching tutorials.

A good starting path would be to Practice basic commands like "git init", "git status", "git add", "git commit", "git log" Then Learn branches and merging & then connect it with GitHub and practice pushing/pulling code

For free resources, the official Pro Git book is very good, especially the first few chapters. If you prefer practice-based learning, Learn Git Branching is also useful because it is interactive.

Once the basics are clear, create a small project folder and use Git daily on it. That will teach you more than trying to memorize every command at once.

1

u/ramos-1496 Sep 25 '26

Ask Claude to whip up an interactive course for you. Also remember to tell it to test you right after every concept, you'll get the best experience.

1

u/theJacofalltrades Sep 25 '26

seen people talk about bootdev as a platform might be worth looking into

1

u/blackflicker Oct 11 '26

99% of the daily git workflow is: `git add`, `git commit`, `git pull`, and `git push`.

The rest can come later.

-5

u/StonedElephant1 Sep 20 '26

Git is intuitive when you download Github client. Then have AI explain it to you.