git notes main page | gitolite main page | license

IMPORTANT NOTE: although this page has a "gitolite.com" URL, this is not about gitolite. That's just an artifact of "sitaramc.github.com" being translated to "gitolite.com" and so ALL my git related stuff gets carried over. Gitolite documentation has another /gitolite in the URL, so you can tell. My apologies for this confusion.

git’s native GUI tools

Git comes with 3 GUI tools, but two of them are a bit more important than the third so we’ll focus on those for now.

These two tools are very powerful; if you don’t like the command line, you can quite easily stick to them and get by for most purposes. Briefly, they are:

Git’s GUI interfaces let you do almost anything that you normally need to do – all the simple straightforward things as well as some sophisticated things.

git gui

git gui shows you the current state of your work area with respect to the currently checked-out branch. In the top left pane, it shows you what files are changed with respect to the last commit. In the bottom left pane it shows you what files have been marked “ready for commit” – only these changes will go into the next commit if you commit now.

(Git allows you to keep some changes “pending”, without committing them. The “ready to commit” part is called the “index”, “staging area”, or “cache” in the documentation, so the bottom left pane is showing you what is in the “index”. Check out why the index is useful for more).

In either case, the changes made to the currently selected file are shown on the right pane.

There are a lot of things you can do in this GUI, but here are the basic things:

gitk

gitk (or gitk --all, which is what I use more often) shows you a visual tree of all the commits that have happened on this repository. It is a very powerful tool, allowing you to do all sorts of things like

There’s a much more detailed description of gitk’s features if you need it.

where you really need the command line

One common task that is needlessly complex in both the GUIs is git pull. In a properly setup repository that has been cloned from the project master or something like that, getting the latest changes is just a matter of typing git pull. In git gui, described above, this takes 4 steps, although there is a reason for that complexity :-)

further reading

There’s a really thorough introduction to these tools, including lots of screenshots, at https://nathanj.github.com/gitguide/. The page has an excellent example “project” that is simple enough that you can concentrate on the git features being demonstrated, and the author goes into quite a few things you can do with the GUI tools.

Some minor caveats: