Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
git is a version control software. Now what the heck is that ?
Imagine you are writting a program. Cool
You started writing code today. Cool. At the end of the day, its still not a big and complex one. Obviously. But its working as expecting at this stage. You program contains 50 lines by now.
Next morning you added a new feature.
"hmmm"
You tried to run the program. It didnt worked as expected. So you started fixing it. Its just 50 lines. Not a big deal. you fixed it.
At the end of second day project had 200 lines of code. Added some new and changed previous day code.
At the end of 3rd day you project is having 300 lines of code. Added some new, and changed the previous ones.... "hmmm, going good"
But wait. You just figured out while testing, the code you added on the 3rd day, is not without flaws. No problem you can just delete the code you wrote and restore the code you touched. But deep inside you brain you know its not that easy and very time consuming -
And you are going to see more situation like this in future. So you brain comes out with a solution. You will save the code after every change or few couple of minutes with version naming in filename. But how long is this going to help ??
within first few days you will be having dozens of files. If project is large you are going to have hundreds of files. Can you maintain them? Besides, can you remember what changes each files have.
Your mighty brain at work again. "I will keep a list of changes on notepad or excel sheet". But do you think it is the best solution ?
Still not an issue??
Say you are working with a team of 5. How are you going to track the changes made by fellow team mate. You all started with the same code in the morning. By end of the day all made some changes to the code. Now how you are going to bundle all the changes togethor??
Sure you can wait for fellow coder to finish working on the file. But seriously, do you have that much time ?? -
These are the reasons we need a software to maintain the versions of your code. So you can restore the change to some timestamp from past, where it was working fine.
To create a fresh new copy of project, and start making change to these new duplicate, so in case if you fucked up the code you can still move back to you original project. If you code worked fine, you can put you newly added code, back to original one. -
@chiragiem36 Thank you so much for your super explanation! I know why git is important and why every developer use it everyday.
But I need some practice to learn this things. I have my github repository (link on my account). But what i just there I just uploaded my projects there what I did. And havent tried yet other features except commiting. So I need some direction in that sense that where should I proceed now. 🙂 -
@MCCshreyas follow BostonNewTutorial tutorial on github on youtube. Great stuff
-
lucifyer5127yTo begin you could also view the traverse media video on git crash course on YouTube.
-
endor56667yhttps://atlassian.com/git/...
Personally, I found this site to be particularly helpful for learning the basic workflow, and then some. Doesn't dwell too much on the minutiae, but the explanations are very clear and drive the concepts straight into your brain
Related Rants
It's really getting hard for me learn git and it's working 😞😞. I got some concepts like commiting changes and some other.
But, will anyone please tell me tutorial about learning git. And its working.
Btw I am CS student right now and really wanted to learn about git and it's importantance.
undefined
push
student
git
commit
github
cs