« Previous - Version 15/25 (diff) - Next » - Current version
kju, 04/02/2009 17:20
Structure improved.

Git Gui Guide

Welcome to the Git Gui guide.

Setup local repository

Alright let's get started.
We will sort out the standard workflow and the different naming of git,
to make yourself somewhat familiar with the new tool set.

Make sure you are ready

  1. [[Git#Installation-of-the-Core-Client-MSysGit:Required tools: MSysGit]]
  2. [[SSH-Keyset:SSH key]] created, loaded by pageant and sent to kju.

Get repository

Next you need to download the git file repository of your project.

To create the git repository on your pc, we will use Git Bash (command line) as this seems most simple.

Important: Make sure you ssh-key is loaded via pageant. See SSH-Keyset in case of trouble.

  1. Go in the explorer to the folder you want to put the stuff in.
  2. Click RMB on that folder.
  3. Select Git Bash.
  4. Enter git clone URL (Clone equals to SVN: checkout).
    git clone git@git.dev-heaven.net:REPOSITORYNAME.git

You will get the repository name from the project manager or at times in the projects wiki.

Wait for the process to finish. This can take quite some time. Patience!

Standard day-to-day workflow

Get the latest files from the server.

To my knowledge you cannot use Git Gui for this operation, so again Git Bash is our choice.

1) In the explorer click RMB on any folder inside the git repository.
2) Select Git Bash.
3) Enter git pull (Pull equals to SVN: update).

Note: Unlike with SVN, the level do not matter for this command.
With a standard git repository without submodules, you can only update the complete repository
and not only a subtree of folders and its files.

git pull

Sometimes you have to specific the branch you want to download.
Yet normally you stay on the master and there is no need to add it.

git pull origin master

Uploading your changes to the server.

In SVN this is only one command: SVN: commit. For git this is split into three phases.
This is a bit confusing at first, yet it is simple and does have it advantages:

  • git stage file(s)
  • git commit file(s)
  • git push


This means you mark files ready for the commit command.
This allows some advanced use, yet for our standards these are not important.

Let's launch Git Gui now finally.
Again you need to select one folder inside your repository - which one doesn't matter.

  1. In the explorer click RMB on any folder inside the git repository.
  2. Select Git Gui.

I) The button the in the lower center, called rescan,
or F5 will check your repository for modifications.

II) In the top left box, called unstaged changes,
you will see all the files you have modified in the repository.
Use CTRL or shift + mouse click to select multiple files in there.

III) CTRL T will mark the selected set as staged and will put
them in into the lower left box, called stages changes.

IV) Now the staged files should be in the lower left corner.
If you want to unstage a (set of) file(s),
select commit->unstage from commit from the menu bar.


You can now commit the staged files to your local repository.
In other words you can always add a change to your local repository first.
This is useful when not having an Internet connection or
to create logic atomic commits as often as possible.

In the lower right box, called commit message, you have to define the commit comment.
Use the standard syntax according to your project like

~ Added: new feature X. Players can now self kill by pressing ENTER.

The key shortcut to to the commit is Alt Enter or press the commit button in the bottom center.


Once you want to upload all your commits to the project server somewhere in the Internet,
select git push. Again button in the lower center or CTRL P.


~ What is sign off.
~ Handling of conflicts.
~ Reverting changes / getting back deleted files.
~ Simple file diff via explorer.
~ How to check the history.
~ Merge http://dev-heaven.net/boards/1/topics/show/15
~ Problems.

git_gui.jpg (139.3 kB) kju, 02/07/2009 11:35

git_bash_clone.jpg (49.6 kB) kju, 02/07/2009 11:55

git_bash_pull.jpg (108.5 kB) kju, 02/07/2009 11:55

git_push.jpg (77 kB) kju, 02/07/2009 11:55

git_push.jpg (22.9 kB) kju, 02/07/2009 16:27

open_git_gui.png (6.3 kB) kju, 04/02/2009 17:27