r/learnpython • • Sep 22 '20

What is learning GIT?

I saw in a post that you have to learn git for most programming jobs, what exactly is git? and where can i learn it, i always just assumed its just uploading your stuff to github. not too sure if this is the right place to post this

347 Upvotes

116 comments sorted by

View all comments

194

u/BruceJi 📦 Sep 22 '20

Git, the greatest tool that a programmer can use.

On a very basic level, git is just... uploading your stuff to github, sure. But git can do a lot more.

If you upload your changes to it well, it will let you go back in time and see old versions - useful if you introduced a bug or if you accidentally erase stuff.

It lets you set changes aside into separate branches, useful if you want to keep a clean, working version and still be making changes to it.

It makes working with other people easy, too. They can access the same stuff and edit it. Someone will need to check over their changes before they're combined into the main master branch.

Oh, it will also let you know if combining changes like that is complicated and should manually be done. Otherwise it can just combine them itself.

But on a basic level, sure - you upload your code to github. It means you can access it from home and elsewhere, and it also, yeah, means if you screw it up, you can easily go back (providing you update it well!)

103

u/dslfdslj Sep 22 '20

Git and Github are two different things. You can use Git without a Github account. You can use Git even without having an internet connection. What Git does is save your old work states locally. If you want you can synchronize them with other computers. For example with your own server, or someone else's computer, a Gitlab server or even a Github server. But you don't have to.

154

u/eightslipsandagully Sep 22 '20

Git is to GitHub as Porn is to PornHub.

0

u/[deleted] Sep 22 '20

[deleted]

9

u/delta_tee [pine, birch, maple, juniper] Sep 22 '20

🤗

4

u/PinBot1138 Sep 23 '20

Poor man’s gold for you! 🥇

76

u/HintOfAreola Sep 22 '20

Wat r u doing, step-dev?

9

u/eightslipsandagully Sep 22 '20

I'm stuck in a merge conflict

15

u/Ratatoski Sep 22 '20

I got my finger stuck in the keyboard.

26

u/[deleted] Sep 22 '20

So GitHub has all variety of Git?

42

u/wasmachien Sep 22 '20

Sure. On GitHub you can find your run of the mill vanilla python and javascript projects. You can go hardcore with the openJDK or the Linux kernel. And if you're into bdsm, just search for php, but please do it in private mode ;-)

3

u/Beelzebubs_Tits Sep 22 '20

Funny! I’m super new to all this, but I’m looking at local job adverts they mention php especially. Wondered why.

4

u/Ozigee Sep 22 '20

There's still old code you have to maintain. Basically job adverts with PHP in it screams that you wouldn't be writing new code, I mean from the scratch.

15

u/dslfdslj Sep 22 '20

I guess that's actually a good comparison.

2

u/huge_clock Sep 23 '20

Which is why I much prefer YouGit and BigGitties.com

1

u/vectorpropio Sep 22 '20

That's would be a better comparison if you where the director ching scenes, editing, changing music.