Rodrigo’s response brings several advantages of Git, so my answer goes more as a complement, trying to cover some other points.
I understand that Git turns out to be the default option even for individual projects for some reasons:
Experiment. Probably the developer has worked on a project that uses Git. And if you didn’t work, it is certainly worth learning because this knowledge will certainly be used in your professional career when participating in new projects or working in other companies. The same cannot be said of other versioners.
The "trunk" (stash). It is very simple to save for later that code you (think you) will need later using the command git stash
and come back with it all git stash pop
. I don’t know if other versioners have anything like it, but it’s a very useful resource.
Staging Area: if you are a person who likes things very well organized, you can use the Staging Area Git to separate into different commits the various changes made to the code, without worrying if another developer is finding an exaggeration :)
There are two more points, which I will explain further below: ease of creating a repository and ease of understanding.
About the ease of creating a repository, for me there is nothing simpler than getting to the root directory of your solo project and doing:
git init
And immediately have, without setting up anything else, a fully functional Git repository for that solo project of yours, so you can take advantage of all the tools that Git offers.
Now, let’s imagine the scenario of a developer who’s never seen Git in his life.
Usually many people end up thinking about the SVN as an alternative. But maybe getting an SVN repository to work isn’t as simple as simply learning to use Git.
That said, let’s have doubts:
Objectively, what is really determining for choosing to trade SVN for Git in an individual development scenario? Which killer feature can define this choice? Remember that some of the advantages of Git do not apply to this scenario.
For the reasons I explained above, it can end up being more difficult to get an SVN to work than simply creating a local repository and learning Git. And if you’re familiar with Git, I don’t see the benefit of using SVN in most scenarios.
Is there an advantage to this? I will lose something significant with the exchange?
Now, finally, I’ll explain about what I said about ease of understanding Git. Maybe Git commands aren’t very friendly, but their internal workings are much clearer (at least for me).
My experience with SVN is old (mid-2011). At the time I was able to understand much better how Git worked than how SVN worked, and that in a very short time. With Git you can simply think of your repository as a large graph, which makes it easier to understand several repository scenarios in a visual way.
Let me give you an example of how SVN can be confusing and, in advance, I apologize for not bringing more details, because this happened to me a long time ago.
In SVN, sometimes we needed to take individual revisions from a branch of a task any and move to another branch of release. After that, we would merge the task in the branch of release and the SVN simply ignored in the merge all revisions of the task prior to that individual revision. I know this is a behavior of merge, but the fact that SVN allows you to select a crease of revisions (or revisions individually) in this merge process left the situation very confused.
When I finally came to understand how Git was simpler in this same scenario, using cherry-pick
, and making clear his difference to the merge or rebase, I began to sympathize with the tool :).
Put the link anyway. Anyone with enough reputation there can see the original question. Put Jon Skeet’s answer too.
– Victor Stafusa
@Victor, it’s been removed anyway, it’s 404, and it’s not on my profile. He stayed there for years without disturbing anyone with multiple votes, and suddenly, someone decided it didn’t fit. I didn’t even know why it was closed and why it was removed definitively so fast. There was nothing wrong in the question.
– Maniero
I am an extremely disorganized person, I always end up making a lot of copies of the folders of my projects (for backup, to test in other environments, etc). A decentralized version control system (like Git, although I use Mercurial) breaks a gallon in this case - mainly because I don’t always have the "official repository" on the same network from where I make the copies. A system with a centralized server would not bring me much benefit, whereas a decentralized one allows me to merge changes from one environment to another without becoming a mess...
– mgibsonbr
The funny thing is that such a subjective question was: http://stackoverflow.com/questions/138621/best-version-controlfor-lone-developer
– Maniero
I know Git fairly well, so much so that I even answered here: http://answall.com/a/43894/101
– Maniero
Sometimes git is even easier to use alone. For example, it can be all in . git, it is not required to create a separate repository (such as "server"), and undo actions (including commits) is considered a normal part of the workflow and well documented (not impossible with other tools).
– marcus
I use GIT programming by myself. I only know the right-to-right and I’m ashamed to say I don’t know how to work in a group with it. Hell, sometimes I curl up with myself (denied fast-forwards). All the tutorials I meet focus more on the technical part, on diagrams of what is happening behind the scenes, but forget that some people have difficulty interpreting this kind of thing. Too bad it is not the scope of the topic because it would be a very interesting topic to be in KB.
– Bruno Augusto