-
-
Notifications
You must be signed in to change notification settings - Fork 16
Setup
- Installation
- Configuration
- Remotes
- Credentials
- Git Settings
- UniGit Settings
- External Programs
- Credential Managers
- Git LFS
Most settings, buttons or fields have tooltips that explain their function. Just hover over them in the Unity Editor to see information about them.
To install UniGit just place all the files in your project's Assets
folder. Once copied you can start using the plugin.
If you put UniGit in an empty project, or a project that is not a Git repository, a notification will be shown on every UniGit window. The notification will allow you to Initialize a git repository. Note that UniGit copies a built in .gitignore file that contains all the necessary Unity3D filters. The ignore file also ignores UniGit itself
If you want to clone an existing repository, you will have to do so with an external tool. Unfortunately this plugin requires Unity and changes to project setting or other files outside unity may not be allowed.
Once you initialize a repository a master
branch will be created. If you want to assign a remote to this branch, you must create one first.
In the settings menu open the remotes
tab, there you can add a new repository and assign its URL and Name. Once the repository is created you can head over to the Branches
tab in the settings window. There you can assign a remote to your new master
branch, or any other branch in your repository.
Once you push/fetch changes to/from your remote repository a new branch will appear, Called (remote name)/(branch name)
- substitute (remote name)
with your remote name and (branch name)
with your branch name.
UniGit has it's own Credentials manager. This manager is entirely optional, but if used will allow you to automatically fetch changes from remotes. It uses Windows Data Protection API (DPAPI) to encrypt passwords.
The Git Credentials Manager only works in Windows
To add a credential go to the Security
tab in the settings window. Once you create a credential you can name it, assign a URL (usually the path to your remote repository), add a username and/or change a password.
GitHub tokens are also supported.
It is important to not include the Git-Credentials.asset
file to your repository, especially if you use a GitHub token. This is the file that your encrypted passwords are used. If you do include this file, the Windows Data Protection API should help protect the encrypted password as it can only be decrypted by your Windows user.
If you don't want you use the credentials manager you can always type your password manually when you push or fetch changes.
Git has a lot of settings. Documentation no all Git settings can be found here. UniGit includes some of the basic settings, like:
-
User.Name
The Name of the user -
User.Email
The email of the user
You can find these settings in the General
tab in the settings window. You can also manually edit the local config file .git/config.
-
AutoStage
this options allows for automatic staging of changed files. Staging the changes ready for committing. -
AutoFetch
allows for automatic fetching of changes from remote repository. This will notify you of any changes made to the remote repository. Note that if the changes are quite big, the fetching process might take some time, as fetching download all changes but does not merge them.
UniGit provides the use for External Programs for tasks like pushing,pulling,fetching,merging,committing and others.
You can choose your external program and when to use it in the Externals
tab in Git Settings.
Programs that work with UniGit:
- TrotoiseGit
- Git Extensions
Many operations that connection to a remote repositories, like pulling, pushing and fetching require some form of credentials. UniGit allows for direct input of username and password each time you do an operation.
UniGit has it own credential manager, that uses Windows Data Protection API (DPAPI) to encrypt passwords, but also allows for external Credential Managers. Managers that work with UniGit include:
- Windows Credentials Manager (Windows 7/8/10)
To choose your credentials manager just head over to the Security
tab in the settings window. Note that if you change credential managers your old passwords will be lost, even if you used the inbuilt credential manager.
Note that Git LFS with inbuilt tools is still in beta. It is recommended you use External tools when pushing, pulling, fetching or merging.
Git Large File Storage will work out of the box while using external tools. If using inbuilt tools then you need to setup a credential manager like Windows Credentials Manager os that Git LFS has access to your credentials when pulling and push
Features and Usage: