Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Haxk20441613yIts better because of you can see commits and when something fucks up you know which commit (update l) did it. And people can open issues about your code bugs or whatever and people can contribute to your code when you allow them. And lot more great stuff trust me use got and better then GD in lots of ways
SHA-25615563yone thing though. Git is not GitHub
Root606663yGit's learning curve is basically a cliff (less so than vi), but it is so absolutely worth it.
Git is amazing!
Fradow10123yThere 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.