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
-
@Haxk20 I see. That makes sense! Thank you for your answer. Only one last doubt, it is possible to return to last versions of the code? Like if something fucks up on version 6 can I push version 5 or even an older one through git?
-
Root797678yGit's learning curve is basically a cliff (less so than vi), but it is so absolutely worth it.
Git is amazing! -
Fradow9088yThere is history as other have said (you can get back to litteraly ANY commit you made), but there is also merging : Git is able to auto-merge most of the code, and will sensibly ask you to resolve a merge only when it's not obvious.
The "Drives" will choke on any merge, or just keep the most recent version, which is not always the correct anwer.
A very nice side-effect is that it forces you to review your changes before commiting. I can say I did catch quite a lot of bugs that way. -
Git basically creates a snapshot of every change you make (only the bits that have changed which is called a delta).
The main group is called master but you can create more groups (called branches) of isolated changes which you can merge back into the main one at a later date. -
Okay, This is how git can save your ass ->
A: I finished coding this part, I tested this feature and it works.
B: Okay cool, let's merge your changed. (some few typo and Boom!, Your code base is now update)
Some later on...
A: oh, it has some bug, let me fix it real quick(create another branch).
B: fine, I dont finish mine yet.(leave it to A and B stil doing his works)
A: Im done.
B: Mine feature too, lets merge it and call it a day. (few typo, Boom! update)
Now compare to GDrive
A: I finished my feature, let see my drive.
B: okay time to merge change, let's open his file and mine to see what code he changed and copy/paste to mine. (fuck he change 20 file, this is gonna take long)
A: Oh, their is a bug. Lets fix it.
B: Wait, Im not done yet.
A: Nah.. we'll merge again.
B: Wait what is the lastet version?
A: Nah..let me fix it first.
B: How u gonna make it if you dont track my change?
..............................
Btw, git make you easily roll back your work. (fuck....., char limit) -
Or this one->
A: Im working on featue A.
Boss: fix our version 1 stable bug.
A: Create hotfix branch, fixed, commit, push, release hot fix
A: merge hotfix back to develop.
A: checkout feature he currently working, rebase develop and continue flawlessly.
Related Rants
Very noob question. I started using git/github for my classes in Python, but I dont see why is it any better than google drive or onedrive, since you can also send multiple archives and have it synced to your computer without having to "push". Why is it so popular and needed?
undefined
github
noob
help
git