I probably wouldn't have looked at Git if you hadn't provided SmartGit...
This page gives an overview of the basic usage of SmartGit. In addition to explaining the basics, we will focus on those features and peculiarities of the program that may be difficult to discover for first-time users. For more comprehensive documentation, please see the manual.
SmartGit allows managing and switching between multiple Git repositories, which are usually organized in named projects. With the various items in the menu, you can open an existing repository, clone an existing repository, or create a new, empty one. will show a dialog that allows you to open, rename or group your projects. See this manual section for more.
When you open a repository, its working tree content will be shown in the Directories pane on the left (1) and the Files pane on the right (2). The selection in the Directories pane determines what is shown in the Files pane. Note that the Files pane is recursive by default, meaning it will not only list the files in the selected directory, but also the files in its subdirectories.
If you click on the arrow button on the top right of the Directories pane, a drop-down menu of all your projects will appear. This is the quickest way of switching between projects.
The Files pane has a toolbar (3) containing various filtering options. These allow you to hide certain types of files, e.g. untracked files and unmodified files. If you're wondering why your files aren't showing up on the Files pane, you should check your filter settings. Note that directories that are marked as 'ignored' will not be scanned and hence the files in them will not be shown.
The Files pane supports a feature called speed search: Just click on it and start typing the name of a file — the table will immediately select the first file that matches the typed text (or glob pattern). You can then use the cursor keys up and down (or Shift+F3 and F3) to go to the previous and next match. This is a quick way of jumping from one file to another. Speed search isn't restricted to the Files pane though: Many other lists and tree structures throughout SmartGit support it. Just try it out!
After you've created, modified or deleted files in your repository, these files will show up with special icons on the Files pane. Also, red arrows will appear next to the directories that contain the changed files. The Commit button on the main toolbar (4) allows you to commit your changes. Clicking the Commit button will open a dialog where you can enter a commit message, as shown in the following screenshot:
It is worthy of note that the initial file selection on the commit dialog depends on your current selection on the main window. For example, if you select the root directory of your repository before opening the commit dialog, all changed files in the repository will be selected for committing. If, on the other hand, you select a particular changed file on the Files pane, only this file will be selected for the commit. To commit staged changes, either select a file with index changes or select the root directory before clicking on the Commit button.
Before performing a commit, you often want to review your changes in order to catch any errors. SmartGit offers several ways of doing this:
For those cases where an error does make it through the review phase and ends up being committed, SmartGit provides several options in addition to the standard Git procedures to fix commits:
Clicking on the Log button on the main toolbar will open the Log window where the commit history of your currently opened repository is displayed — see the following screenshot. Branches and tags are shown as boxes on the left of the commit messages, and a little green arrow shows where your HEAD commit is (6). Use speed-search to find commits by message, author or SHA ID.
Similar to the commit dialog, what is shown in the Log window depends on what was selected in the main window before the Log was opened: If the repository's root directory was selected, the history of the entire repository will be shown. On the other hand, if a particular file was selected, only the history of that file will be shown.
The context menu of the Commits pane contains a couple of useful operations: Among other things, you can check out commits, perform merges or rebases, create branches or tags, or perform resets — just right-click on a particular commit and select the appropriate entry in the context menu. By right-clicking on certain files in the Files pane (7), you can compare any older version of a certain file with its current version in the working tree. In the Files pane, you can also save older versions of a file to disk.
Normally, when a single commit is selected on the Log window, the various panes on it will display the changes made in that commit. However, when two commits are selected, the panes will instead show all changes made between these two commits.
SmartGit has various controls related to pulling from and pushing to remote repositories. First, you can pull and push with the Pull and Push buttons on the main toolbar. Since you'll often want to perform both actions one after the other, SmartGit also provides a Sync button on the toolbar for doing both with a single click. For more information about these operations, see this manual section.
Second, commits can be pushed via the context menu of the Pushable Commits window (5). If this window isn't shown, you can open it via . On the Pushable Commits window, you can choose to push only the commits up to a certain point (i.e. commit X and all commits older than X) instead of pushing all of them. This allows you to keep one or more commits locally for modification, for example with the Amend option.
Third, there is also a Push Advanced dialog, which can be found in . One of the things you'll need this dialog for is pushing tags — these won't be pushed automatically after you create them.