Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What should I know about Git before I start using it?

I have used "traditional" version control systems to maintain source code repositories on past projects. I am starting a new project with a distributed team and I can see advantages to using a distributed system. Given that I understand SourceSafe, CVS, and Subversion; what suggestions do you have for a Git newbie?

like image 707
Ed.T Avatar asked Sep 24 '08 12:09

Ed.T


People also ask

What should I know about Git?

“Git (/ɡɪt/) is a version-control system for tracking changes in computer files and coordinating work on those files among multiple people.” So that means that the most basic and important function of Git is to allow teams to add (and merge) code at the same time to the same project.

Can I use GitHub as a beginner?

GitHub's interface is user-friendly enough so even novice coders can take advantage of Git. Without GitHub, using Git generally requires a bit more technical savvy and use of the command line. GitHub is so user-friendly, though, that some people even use GitHub to manage other types of projects – like writing books.


2 Answers

The Git - SVN Crash Course is a good read for getting going.

like image 191
John Topley Avatar answered Nov 15 '22 21:11

John Topley


In my own experience moving from Subversion to Git, the most important thing is not what you need to learn, but what you need to unlearn. Distributed Version Control is very different from Centralized Version Control. CVC is a subset of DVC, so you can just do CVC in a DVC tool, but it will be more complicated than with a CVC tool.

Try to unlearn CVC, and get in the DVC mindset. If you just end up doing CVC in a DVC tool, you will merely be frustrated by all the added complexity and you will not realize what that added complexity is buying you in terms of flexibility.

All DVC tools have great and very powerful support for branching and merging. Use it. All the history is available at your fingertips. Use it. (For example: never comment out code, just delete it. You can always get it back, even on an airplane with no internet connection.)

One very important aspect of Git: all other tools have a more or less defined workflow. Git doesn't. Git is a DVCS workflow construction kit. This makes it sometimes hard to know what to do: you have to design and implement your own workflow (hint: use lots of shell scripts). I use Git for more than a year now, and I still haven't completely figured out my workflow yet.

like image 27
Jörg W Mittag Avatar answered Nov 15 '22 20:11

Jörg W Mittag