r/learnpython • u/mo_10 • 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
1
u/Nekose Sep 23 '20
Git was explained to me by an example of how it could save your ass.
Lets say you made a program. Cool, it works!
Now lets say you make changes, resulting in version A, which takes 50 hours. Good job.
Now lets say you change things again, which takes another 50 hours, and gives you version B. Great!
Now, and here is the kicker, lets say you find out version B introduced a significant bug that needs to be fixed within an hour. If you didn't have git, how would you recover the last stable version (A), all the while keeping your new work (version B) from being overwritten?
The answers is branches in git, but without that you hopefully have been copying your entire working directory into date-stamped back-up directories.