meaf75 / GitNity

Unity editor plugin for a git integration with Unity projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GitNity - Git for Unity


gitnity-assetstore


Git integration for Unity projects, all basic tools inside the editor

Github Repository: https://github.com/meaf75/GitNity

Plugin under development: I'm still working on this project 👷 so be careful using it on larger projects and feel free to contribute it 🚧🚧

GitNity GitNity

Features

Unchecked means To Do

  • List changes (Modified, untracked, new, merge error)
  • Commit files by selecting them
  • Push pending commits
  • Fetch changes
  • Pull changes
  • Create & switch branch
  • Display git commits, filter by branch
  • Context Menu on right click on an asset
  • Generate .gitignore
  • Draw status icon on files with modifications or tracked by git
  • Private ssh key support
  • Draw icon for ignored files/folders
  • Merge tool or open X file with the script editor assigned in preferences
  • LSF support
  • Git Stash & Git stash pop/apply

Table of content

Requirements

  • You must have the git command line tools registered in your system path, you can install it at https://git-scm.com/download.
  • Unity 2021.3.x

Installation

From a git url

You can install this plugin via assets manager from a git url

install-1 install-2

More information at: https://docs.unity3d.com/Manual/upm-ui-giturl.html

https://github.com/meaf75/GitNity.git?path=/Assets/Plugins/GitNity

From this repo

Copy the content of this repository located at Assets/Plugins inside a folder in your unity project located at the same route

Instructions

Configuration

  • All windows are located under Tools/GitNity.

    path

  • Configuration window allows you setup repository information (Tools/GitNity/GitNity Config).

    config-window

  • Make sure your project is a git repository if not then you can initialize your project from the config window (Tools/GitNity/GitNity Config).

    config-window-warnings

  • You can also set a ssh key path to authenticate with your private repository by setting the private ssh key path.

    config-window-warnings

GitNity window

  • First you will need to select the files you want to commit, you can do it by selecting the files in the GitNity window (Tools/GitNity/GitNity Window), add a commit message and add a commit message, finally you have to click the "Commit selected" button, this action will add selected items and commit them.

    gitnity-window-select

  • After commit your files the final step is push your commit, when you have commits without push a "push" button will apear next to the "Commit selected" button, click it to push your pending commits, this action will make the selected files to disappear from the list don't worry they are staged with the new commit.

    gitnity-push

  • Icons will be drawn over the project assets to represent their git status inside unity modified-assets

    Status Icon
    Deleted
    Modified
    Type changed
    Renamed
    Copied
    New
    Unknown
    Ignored
  • Context menu, if you right click over a element in the list of tracked files a pop up will appear with some useful actions context-menu

Branching

  • branching, you can switch between git branches by clicking over the drop down at the top right corner of the GitNity window, all tracked branches will be displayed as value in the dropdown menu swith-branch

  • you can also create a new branch by selecting "New branch..." option in the branch dropdown. new-branch-option

    this action will make apear a window where you can set the information for the new branch

    new-branch-window

Commits tab

  • You can list the commits made in a specific branch by selecting the "Commits" tab in the GitNity window

    commit-window

Diff window

  • You can see the changes that you made from a specific file by right clicking over a file in the ListView and selecting "View changes"

    context-diff This action will open a window to display all the changes for the selected file

    diff-window

Git commands used

You can find a full list of all the git commands used on this project at README_GIT_COMMANDS.md

About

Unity editor plugin for a git integration with Unity projects

License:MIT License


Languages

Language:C# 99.8%Language:JavaScript 0.2%