Git - the new Subversion
March 15, 2018

Git - the new Subversion

David Petrie | TrustRadius Reviewer
Score 8 out of 10
Vetted Review
Verified User

Overall Satisfaction with Git

Git is one of the source code version control tools used at my organization (the other major one being Subversion). We are using Git to store our source code across multiple repositories and branches (features and bugs). We have a mainline development branch which all our new code is eventually pushed to, after being code reviewed by their branch using pull requests. The development branch in our Git repositories are polled for any changes, and builds are automatically run to verify the code.
  • Branching
  • What I find as the main benefit of Git is the ease that branches can be created in a repository - whether that's for working on new features or to fix bugs. It's as easy as selecting the code you want to branch from and "git checkout -b newBranch". Mainly I use this for branching from our development branch (also known as trunk) and once the code is finished, we merge the branch back into the development branch. Switching branches in Subversion is a little bit more complex, whereas Git is super easy to use.
  • Pull Requests
  • Pull requests can be created on a repository allowing code to be reviewed before being merged to the main branch. External tools like Bitbucket can be used to integrate into the Git repositories, allowing users to easily review and comment on your pull requests.
  • Local Repositories
  • When you use Git, you checkout the repository to your machine locally - and any commits that you make only affect your local repository, rather than the "real" repository at a remote location. This allows you to commit often and finalize all of your code before merging onto the latest development branch.
  • Understanding
  • Git has a little bit more of a learning curve when compared to other source control solutions, e.g. Subversion - but this is due to the more complex features it offers.
  • IDE Support
  • There aren't as many plugins for Git when compared to other source control solutions. Subversion has better plugins for IDEs and seems to be well supported.
  • Git Bash
  • Using Git bash, or the GUI that comes with Git can be slightly daunting at first. Tools like SourceTree are a solution to this problem, as they run the underlying Git commands for you.
  • The ease of use is a big positive with Git. With additional tools like SourceTree and a Bitbucket server, it's really easy for an engineer to get to grips with. Repositories can be easily creating/administered using Bitbucket, and the repositories can be cloned using SourceTree in a few clicks.
After using Subversion previously for a number of years, Git comes across as the new and improved source control approach. Git seems very suited to working with Agile:- branches can be created easily, allowing multiple developers to switch to them quickly, and having local repositories makes working remotely (off the network) very handy! When compared to Subversion we tended to work on the trunk all the time - which could cause Jenkins builds to break, unwanted code on the trunk, etc - with Git we haven't seen this happening.
Git is perfect for any micro-repository solutions, as it can checkout source code quickly and switch between branches easily. For example, let's say you have a new feature to add to a microservice your working on, a feature branch can be created quickly, and the working copy can be automatically switched to that new branch. If you ever need to share your code to a wider public audience, Github is great for this. Anyone with an account can check out and comment on your code and suggest changes. Also, Git is free!

As for a scenario where you wouldn't want to use Git, I've heard that Git can struggle with image files (jpg, gif) sometimes, so users with lots of images may want another solution.