Git Gui Guide¶
- 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¶
- [[Git#Installation-of-the-Core-Client-MSysGit:Required tools: MSysGit]]
- [[SSH-Keyset:SSH key]] created, loaded by pageant and sent to kju.
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.
- Go in the explorer to the folder you want to put the stuff in.
- Click RMB on that folder.
- Select Git Bash.
- Enter git clone URL (Clone equals to SVN: checkout).
git clone email@example.com: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.
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.
- In the explorer click RMB on any folder inside the git repository.
- 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