Moving to Git from SVN
When switching from SVN to Git, you might experience some discomfort. For example, you may wonder:
Why should I have to commit, then push?
Given a little time, you will likely get over these little struggles, and git will grow on you. It definitely grew on me. At the agency where I worked at the time (16 years ago?), we started out by just editing files directly over SFTP 😅. It wasn’t uncommon to hear someone call out across the office, “Hey, is anyone in the stylesheet right now?” before starting their work, because we could easily overwrite each other’s work if we edited the same file at the same time. We were complete hacks.
Eventually we realized version control existed, and started using SVN. That was great for about 3 weeks until we discovered Git. It was hard to get used to the idea that the complete repo with all branches and history is replicable anywhere. Coming from our previous SFTP-based workflow, we tended to think that the work we were doing was to some central location of code or files.
With SVN you’re working with patches and changesets – raw modifications to text files. With Git you’re working with
commits, and push
means something quite different from what it does in SVN. It may at first seem a subtle distinction
but actually adds a whole meaningful layer to the workflow and dynamics of version control. You can literally change the
order in which patches were applied with ease, or combine two changesets into one. Or if there’s a change that you don’t
want in your branch, you can simply remove it.
When I really started to understand Git, I remember thinking, “the power of this tool is going to literally change the
world of software.” And I really believe it has done. Git puts the control of how your work is integrated with that of
others (or even other lines of pursuit of your own) into your lap. The idea
of commits as sedimentary layers of changesets is hard to wrap your head around at first, but
it’s so dang powerful when you start using tools like git rebase
, git cherry-pick
and git show-branch
.