Recently I have learned the basics concepts of Git. We did use a bit of git-svn to get familiar with using it. I would like to start my first "true" project on git along with my friends.
Therefore I would like to ask you what are the best practices of using Git in general, and if there are any pitfalls that SVN familiar developer my get into?
The difference between Git and SVN version control systems is that Git is a distributed version control system, whereas SVN is a centralized version control system. Git uses multiple repositories including a centralized repository and server, as well as some local repositories.
The biggest difference between Git vs Subversion (SVN) is that Git version control is distributed while SVN is centralized. There are also key differences in repositories, branching, and more. If you're considering switching from SVN to Git, you'll want to take these into account.
In git every user has their own copy of code on their local like their own branch. In SVN there is central repository has working copy that also make changes and committed in central repository. In git we do not required any Network to perform git operation. In SVN we required Network for runs the SVN operation.
Collaboration among more than one developer is probably best done using a central "bare" repository, which is roughly analogous to a repository in Subversion. Sharing changes between two or more people with only their own repositories, is difficult and prone to error. Also, using a central repository will feel more comfortable coming from a Subversion background.
One great thing about Git is that you can easily have more than one "common" repository. I have my development set up so I keep a set of bare repositories on one server that I usually interact with ("origin" for most of my projects), but for some projects I also push the whole thing up to GitHub. I don't have to choose which one is the single central repository, I can pull and work from the GitHub repository and later push to my own copy.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With