Git for Sublime Text

Git integration with Sublime Text 3 via menus and keyboard shortcuts.

Features

  • Blame, Diff, Log, Status and Update Git commands accessible from context and side bar menus.
  • Git status of current file being edited displayed in status bar.

GitHub

Works On

Screenshots

Installation

Download the Sublime Git zip file and extract into Sublime Text packages directory. Depending on your system you may have to update the git_path setting to point at the correct Git binary.

Usage

The implemented Git commands can be accessed from the context menu of the currently open file or a file/folder in the side bar.

Blame
For each file, print the branch/working revision of the trunk, together with information on the last modification for each line.
Diff
Compare your working files with the revisions they were based on, and report any differences that are found.
Log
Print out log information of a file.
Status
Display the state of a file in the working directory.
Fetch
Download objects and refs from remote repository.
Pull
Fetch the latest changes from remote and integrate them into local repository.
Stash/Pop/Show
Stash the current changes to working directory. Pop the latest stashed changes. Show the changes recorded in the latest stash as a diff between the stashed state and its original parent.

The key bindings can be modified by selecting the Preferences > Package Settings > Git > Key Bindings – User menu entry.

Settings

The default settings can be viewed by accessing the Preferences > Package Settings > Git > Settings – Default menu entry. To ensure settings are not lost when the package is upgraded, make sure all edits are saved to Settings – User .

git_path
The path to the git binary.

Default: /usr/bin/git

cache_length
The number of seconds of time to cache Git statuses - tweaking this may help computers with slower hard drives.

Default: 5

git_status_new_file
If the output from Git status should be displayed in a new file, rather than a panel. Allowed values: 'always', 'foldersonly', 'never'.

Default: never

git_log_show_tags
If the output from Git log should show tags.

Default: true

debug
Set to true if debug messages should be printed to the console.

Default: false

Issues

If you find a problem with the package please contact me.

License

Sublime Git is licensed under the MIT License.