• Senior Software Engineer • Focused on Customers and Craftsmanship • Leader of the Phoenix Software Engineering Reading Group Mike is a DZone MVB and is not an employee of DZone and has posted 20 posts at DZone. You can read more from them at their website. View Full User Profile

Incomplete Thoughts on Git

06.09.2012
| 4587 views |
  • submit to reddit
For the last week or so I’ve worked my way through about half of Pragmatic Version Control using Git with a mixture of excitement and terror. In random order, as it comes from my mind, are some thoughts:
  • Git treats branches and tags as first-class citizens. They are attributes of the repository. Git can easily give you a list of branches in one single git branch command. Coming from the world of Subversion, where branches and tags are tenuously related to trunk, I have to say this is refreshing. I almost said “Of course! It should be this way!”
  • Subversion makes you organize your branches and tags by paths. Git, following from the above, does not. I’ve never much liked having to babysit the Subversion repository hierarchy, even though it is extremely malleable.
  • Going in, I was not aware who authored Git. After I typed out a few commands, I joked to myself that it seemed made for Linux command-line lovers. Spot on.
  • Git operates on file contents rather than files. It knows when code moves from one file to another. It knows when code is duplicated. It doesn’t balk at files being renamed or moved. If you frequently refactor your code, this should produce at least one little tear of joy in your eyes.
  • I wonder how well Redmine, Jenkins, and other heavily-VCS based systems work with Git. I’ll have to find out.
  • Perhaps it’s just this book, but I think I’m seeing inconsistencies in naming. For example: staging, cache, and index. Are they the same? Are they different? How do they relate? I’m not satisfied the book isn’t confusing me. It could be my fault, though.
  • Those familiar with Subversion may see the .git directory as an analogue to .svn. It’s not; the .git directory is the repository.
Published at DZone with permission of Mike Christianson, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Johan Sjöberg replied on Sun, 2012/06/10 - 7:11am

Redmine handles git decently. The browser and code tracking capabilities are great, but so far I've found it to requre a local bare clone of the git repositories to track, promoting a tedious cron-script to keep the clone up to date. 

Hudson handles git excellently, in fact much in the same way it handles svn. To logon-based systems I would just hook up the hudson user with a PKI (ssh-keys). 

Joern Huxhorn replied on Sun, 2012/06/10 - 9:46am

I really liked Pro Git.

It's free and explains all concepts of Git in a very thorough way, i.e. it even explains how Git is working internally. This actually helped me quite a lot.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.