Repository Settings
After selecting a Repository, you can use the Repository -> Settings menu command or the Settings context menu on the highlighted repository.
This opens a dialog to configure certain options of your repository (<repository>/.git/config) file.
Note
- Changes made to a repository’s configuration only affects the selected repository. You can set option defaults globally by using Edit -> Preferences -> Git Config settings. This will become the configuration default for all repositories, although you can still override settings on individual repositories through Repository -> Settings on that repository.
- You can also edit the Git configuration directly by manualy updating your
.gitconfigfile, although you will lose the validation safety net that SmartGit provides.
User Tab
Use this tab to configure your name and email address – this information will be used to identify the commit author when committing to this repository.
Fetch and Pull Tab
These settings allow you to configure options related to the Pull command:
- Whether to Merge from, or Rebase the local branch commits ahead onto the fetched changes, when pulling updates from a tracked remote branch.
- Prune obsolete remote tracked branches removes local remote-tracking branches whose corresponding remote branches have been deleted.
- How to treat Submodule synchronization when pulling:
- Always fetch new commits, tags, and branches from the submodule’s remote.
- Update registered submodules.
- Initialize new submodules which have been added to the tracked remote branch.
Push Tab
This configuration allows you to choose what happens when you attempt to push, and a referenced submodule which has changes (only applicable to repositories containing submodules).
- Abort if changes to submodules – Your push operation will abort, and you will need to resolve the submodule synchronization, e.g. by explicitly pushing changes to submodules before pushing changes in the current (dependent) repository.
- Ignore submodules – Will only push changes in the current repository. Submodule changes will NOT be pushed to the remote.
- Push submodules first – SmartGit will automatically attempt to push changes to submodules, before pushing changes to your current repository.
Note
If your changes depend on the changes you’ve made to your local submodule repository, and you choose Ignore submodule changes, other users may not be able to compile your changes.
Signing Tab
This allows you to configure the GPG program and your private signing key to Sign Tags and Commits, to prove author identify.
Please refer to Signing for further information.
Note
You need to ensure the specified GPG program is configured to use an agent that can ask you for your key’s passphrase using a GUI.
Otherwise you may get a gpg error “cannot open tty ‘/dev/tty’: Device not configured”.
Encoding Tab
Here you can also configure the text encoding SmartGit should assume when viewing text files in the Changes view or Compare window, or when editing files, e.g. with the Compare, Index Editor or Conflict Solver.
SmartGit will automatically detect UTF-8 encoding, with or without leading byte order markers (BOM).
- UTF-8 with BOM, UTF-16 with Byte Order Markers (BOMs) are detected automatically.
- Files with UTF-8 and without BOMs are usually automatically detected from the content, so you don’t usually need to explicitly add BOMs to UTF-8 encoded files.
Unless you have a specific reason for changing the encoding settings, it is recommended that the default UTF-8 encoding be used.
Tag-Grouping
Tag grouping keeps histories with many build or release tags readable. Use the Tag-Grouping tab to configure it for the selected repository. To set shared defaults, use Git Config Preferences.
The same configuration has several uses:
- It combines tags into a compact display in the Log Graph, including ranges of builds that share a file state.
- It organizes the Tags category of the Branches view into groups.
- It helps identify tags containing the selected commit in the Commit View.
Group and single patterns
Use Group Patterns for sequences of related refs, such as tags created by each successful build. Each expression defines a group. SmartGit selects representative refs from the group instead of listing every build separately at each commit.
Use Single Patterns for refs that should remain separate, such as release branches.
For example, refs/remotes/origin/release-.* preserves each matching remote release branch individually.
This lets you distinguish which release branches contain a change.
Both fields accept comma-separated Java regular expressions. Separate patterns with commas without adding spaces. Each expression must match the entire ref name, including its prefix:
- Tags use
refs/tags/, for examplerefs/tags/build-123. - Local branches use
refs/heads/, for examplerefs/heads/release-2.4. - Remote-tracking branches use
refs/remotes/, for examplerefs/remotes/origin/release-2.4.
For example, refs/tags/build-.* matches all tags whose names start with build-.
Use .* to match an arbitrary sequence of characters.
Group patterns take precedence over single patterns. If several group patterns match a ref, the first matching pattern takes priority. Put specific patterns before broader ones, and keep refs you want to preserve individually outside the group patterns. Refs matching neither field keep their usual display behavior.
Group labels and displayed names
SmartGit derives a group’s label from its pattern.
Prefix a group pattern with label: to choose a custom label, using alphanumeric characters and underscores.
For example, builds:refs/tags/build-.* gives the group the label builds in the Tags category.
The label identifies the group; it does not rename the refs displayed within it.
To shorten those names, add a named capture group (?<name>...) to the group pattern.
For example, refs/tags/build-(?<name>.*) displays build-123 as 123.
Without that capture, SmartGit uses the normal tag or branch name, including any nested path.
For example, refs/tags/releases/v2.4 retains the name releases/v2.4.
Example
Set Group Patterns to:
builds:refs/tags/build-(?<name>[0-9]+),versions:refs/tags/v(?<name>.*)Set Single Patterns to:
refs/remotes/origin/release-.*Build tags belong to builds, with build-123 displayed as 123.
Version tags belong to versions, with v2.4 displayed as 2.4.
The branches origin/release-2.4 and origin/release-2.5 remain separate when references are mapped to commits.
Mapping refs to commits
SmartGit walks history from newer commits toward their parents. Along the same line of history, a matching ref replaces later refs from its group as the walk reaches it. This selects a nearby containing build rather than the tag with the highest number or latest creation date.
In a File Log, commits that do not affect the selected file are omitted. SmartGit maps their refs backward along first-parent history to the next displayed commit. Several grouped tags mapped to the same file state can appear as a range.
Example
Consider this history, with older commits on the left:
edit-1 -- build-101 -- build-102 -- edit-2 -- build-103Only edit-1 and edit-2 change the selected file.
With the builds pattern above, the File Log shows 101 ... 102 at edit-1 and 103 at edit-2.
The ranges tell you which builds contain the same file state.
The Git tags still point to their original commits.
For commit details, the mapping also follows merge parents to find refs whose history contains the selected commit. This can identify a build on the development line and another on a release line. Single patterns preserve the identity of each matching release branch during this calculation. See View Existing Commit for the displayed tag and branch categories. Multiple tags on the same commit or refs from different history lines can remain visible within one group.
Note
To include a comma inside an expression, escape it as \, so it is not treated as a pattern separator.
This also applies to quantifiers, such as {1\,3}.
The blue
markers provide further details about the grouping logic.
Other Options
SmartGit supports other options either in <repository>/.git/config or ~/.gitconfig:
smartgit.gui.prefixAddBranch: this value defines the default prefix in the Branch -> Add Branch dialog.smartgit.gui.prefixStartFeature: this value defines the default prefix in the Branch -> Git-Flow -> Start Feature dialog.