September 18, 2014
Hot Topics:
RSS RSS feed Download our iPhone app

10 Git Version Control Utilities to Make You More Effective

  • February 1, 2011
  • By Jason Gilmore
  • Send Email »
  • More Articles »

I'm one of many developers who really enjoy using the Git version control system. A Git Groupie, if you will. It's one of those software projects that just feels right practically from the very first commit. If you're also a "committed" Git user (get it?), you're probably always looking for ways to more effectively manage your repositories. If so, check out the 10 Git utilities introduced in this article.

1. Use Git on Windows with TortoiseGit

The tortoise has somehow become synonymous with running open source version control projects on Windows, thanks to a long line of namesake projects traced back to the 2000 release of TortoiseCVS (a Windows-based CVS client). Over the years several sibling projects were created for interfacing with other popular version control solutions, including TortoiseSVN and TortoiseHg. In late 2008 TortoiseGit became the latest addition to the series, providing Windows users with an impressively well-integrated Git client.

TortoiseGit depends upon Git for Windows, so be sure to install it before installing TortoiseGit. See the TortoiseGit website for all of the installation and configuration details.

2. Browsing Repositories with gitk

If you'd like to view repository changes using a convenient graphical interface, check out gitk. Gitk is a repository browser that makes it easy to review and search a project's commit history. Figure 1 presents a screenshot of the gitk file-browsing window opened to one of my forthcoming books.

Using gitk to browse a book project repository
Figure 1. Using Gitk to Browse a Book Project Repository

3. Managing Repositories on OS X

If you're running OS X and are looking for a more refined interface, check out GitX. GitX aims to be a capable GUI-based Git client for the OS X platform, offering many of the most commonly used Git features, including the ability to browse repositories and commit changes. Additionally, you'll find a few slick features such as the ability to upload patches to gist.github.com using the "Gist it" button (see Figure 2).

Using GitX's 'Gist it' Button
Figure 2. Using GitX's "Gist it" Button
(credit: GitX manual)

4. Hosting Repositories with Gitolite

The majority of Git users assume the role of client, interacting with one or more specific projects which happen to be managed in Git repositories. However, somebody must assume the role of administrator, managing the repositories, repository access, and repository users. The Gitolite project was created with this administrator in mind, providing a solution for allowing a single user account to host multiple Git repositories without having to deal with the complexities of creating server accounts or even granting server shell access. Administrators can use Gitolite to easily grant access rights using a simple configuration file syntax, synchronize Gitweb permissions with those defined in Gitolite, log all project interactions, and much more.

5. Manage Git Hooks with Git-hooks

Git offers a "hooking" feature that causes certain commands or scripts to be run in conjunction with certain commands, such as when you commit changes to a repository. Believe it or not, every Git repository includes several sample hooks, which you'll find in .git/hooks. So if you're not familiar with this feature be sure to check out this directory and peruse the examples.

Benjamin Meyer's git-hooks project provides developers with an easy way to manage Git hooks within three convenient locations, including inside Git repositories, within your home directory, and globally. Meyer reasons this capability can be very useful in situations where a team member would like to execute personalized hooks such as not allowing the team member to push changes to a remote repository during late night hours. Likewise, the global hook integration allows organizations to institute global hooks such as running a spell checker when entering a commit message.


Tags: git, version control

Originally published on http://www.developer.com.

Page 1 of 2



Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Sitemap | Contact Us

Rocket Fuel