{"id":15039637,"url":"https://github.com/timbrel/gitsavvy","last_synced_at":"2026-03-15T23:30:39.110Z","repository":{"id":25975044,"uuid":"29417074","full_name":"timbrel/GitSavvy","owner":"timbrel","description":"Full git and GitHub integration with Sublime Text","archived":false,"fork":false,"pushed_at":"2024-09-01T14:04:13.000Z","size":4853,"stargazers_count":1907,"open_issues_count":62,"forks_count":136,"subscribers_count":24,"default_branch":"master","last_synced_at":"2024-10-29T15:45:55.632Z","etag":null,"topics":["git","sublime-text"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timbrel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":["https://paypal.me/herrkaste"]}},"created_at":"2015-01-18T05:40:08.000Z","updated_at":"2024-10-26T04:54:50.000Z","dependencies_parsed_at":"2023-12-20T14:29:15.827Z","dependency_job_id":"33f2eff2-1f52-4e34-91ec-e30e875a06c8","html_url":"https://github.com/timbrel/GitSavvy","commit_stats":null,"previous_names":["divmain/gitsavvy"],"tags_count":160,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timbrel%2FGitSavvy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timbrel%2FGitSavvy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timbrel%2FGitSavvy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timbrel%2FGitSavvy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timbrel","download_url":"https://codeload.github.com/timbrel/GitSavvy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248449637,"owners_count":21105535,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git","sublime-text"],"created_at":"2024-09-24T20:43:30.171Z","updated_at":"2026-01-21T21:05:49.159Z","avatar_url":"https://github.com/timbrel.png","language":"Python","funding_links":["https://paypal.me/herrkaste"],"categories":[],"sub_categories":[],"readme":"# GitSavvy\n\n[![tests](https://github.com/timbrel/GitSavvy/actions/workflows/lint.yml/badge.svg)](https://github.com/timbrel/GitSavvy/actions/workflows/lint.yml)\n[![License: MIT](https://img.shields.io/badge/-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nGitSavvy is a powerful and mature plugin for Sublime Text that brings most of Git's functionalities directly into the text editor.\n\nIt offers features that just come naturally when in an editor.  For example, you can easily interactively stage or discard changes per hunk, per line, per file. Search for specific content that you just select right in the buffer.  Navigate through the history of commits and revisions of files, write clear and long(!) commit messages (because who wants to deal with a clunky input box in a separate program for that?).  GitSavvy makes standard rebasing actions, like rewording a commit message, trivial, and advanced rebasing techniques, such as splitting a feature branch into two, manageable.\n\nHowever, GitSavvy enhances your Git experience.  It does not replace it.\n\n\n## Installation\n\n### Simple\n\n1. Install the [Sublime Text Package Control](https://packagecontrol.io/) plugin if you don't have it already.\n2. Open the command palette and start typing `Package Control: Install Package`.\n3. Enter `GitSavvy`.\n\n### Less simple\n\nIf you want more control over what you pull down, or if you'd like to submit changes to GitSavvy (👈👌), you should clone the repository directly in the Packages folder and restart the editor.  You still have to run `Package Control: Satisfy Dependencies` after that!\n\n\n**Note:** GitSavvy requires Git versions at or greater than 2.18.0.  However, it is highly recommended to use a more recent version of Git, as some advanced rebasing features in GitSavvy require at least version 2.38.0. Upgrading to the latest version of Git will ensure that you can take full advantage of all the features and improvements available in GitSavvy.\n\n**Note:** GitSavvy does not support Sublime Text 2. If you are using Sublime Text 3, you can access the last supported version by checking out the `st3-2.39.1` tag. That's to say, the current main line of GitSavvy only supports Sublime Text versions above build 4000. For the best experience, use the latest Sublime Text _dev_ build.  Or not, I mean it could also crash you, what am I to recommend here.\n\n\n## TLDR; aka Quick Start\n\nWhen you first install GitSavvy, you may not notice any immediate changes to your Sublime Text interface. Except that you may see the checked out branch name and dirty status displayed in the status bar.  (You can change this in the settings if you want to.)  It's important to note that GitSavvy actually adds a lot of commands to Sublime's Command Palette, which can be accessed by pressing `ctrl+shift+p` on Windows or `cmd+shift+p` on macOS.  These commands are typically prefixed with `git: `, while all GitHub features are prefixed with `github: `.\n\nGitSavvy also comes with dedicated views.  In order to get started with GitSavvy, it's a good idea to become familiar with the `git: status` and `git: Repo History` views first. These views are a great entry point into the GitSavvy world and will help you get comfortable with the plugin before diving deeper into its other features.  (In fact, *I* did not venture beyond the `git: status` view for the first year or so but hey, GitSavvy also changed a lot since then.)\n\nBy default, the status view shows some helpful information, while in the repo history view, you can get additional help by pressing `[?]`. The most important keys to remember in the repo history view are `[enter]` for the main menu and `[r]` for the rebase menu.\n\n\n## Basic Git Functionality\n\nGitSavvy provides all the essential Git commands such as `clone`, `init`, `commit`, `checkout`, `pull`, `push`, `fetch`, and many more.\n\nAll of these commands and features can be accessed easily through Sublime's Command Palette (`ctrl+shift+p`). Just start typing the name of the command you want to use, e.g. `checkout`, and Sublime will quickly select the correct command. You can recognize GitSavvy commands as they are all prefixed with `git: `.\n\nAfter you hit `enter` to select a command, GitSavvy will often start a wizard. For example, typing `checkout` will show a list of available branches, while typing `checkout new branch` will ask for the name of the new branch. Note that Sublime's fuzzy logic helps with typing long commands and remembers acronyms you've used in the Command Palette.  For instance, on my computer, typing `chn` followed by `enter` is enough to create a new branch.\n\n## Special Views for Git Status, Branches, and Tags\n\nGitSavvy provides dedicated views for Git status, branches, and tags. Users can access these views by running the `git: status`, `git: branch` commands.\n\nIn addition to these views, GitSavvy also has sophisticated special views for viewing diffs and patches, making commits, or showing the repository history. However, for new users, running the `git: status` command may be the first entry point into the GitSavvy world. From here, you can stage (`[s]`), unstage (`[u]`), and discard (`[d]`) changes to whole files. You can also start the commit phase (`[c]`), open the repository history (`[g]`), open a diff view (`[f]`), and push the current branch (`[p]`).\n\n*Tip*: if nothing has been staged yet, pressing `[c]` will default to committing all changes with the `-a` flag.\n\nNote that views with smaller content like the status view typically display their keyboard bindings directly at the bottom of the screen, while views with larger content, e.g. the repo history, will only show the key bindings in a help popup after you press `[?]`.\n\n\n#### Usability Note 1:\n\nGitSavvy comes with a lot of keyboard bindings, but it doesn't include any *global* shortcuts. This is because adding global shortcuts can conflict with other packages or built-in functionality. However, you can easily add your own global shortcuts by opening Sublime's key bindings file (`Preferences: Key Bindings`).\n\nFor example, you can add a global shortcut to open the status view from anywhere by adding the following to your key bindings file:\n\n```\n{ \"keys\": [\"ctrl+shift+s\"], \"command\": \"gs_show_status\"}\n```\n\nThis will allow you to quickly access the Git status view with the `ctrl+shift+s` shortcut, no matter what file or view you have open. You can add other shortcuts for other GitSavvy commands in a similar way.\n\n#### Usability Note 2:\n\nAfter checking the `git status`, the second most common action is probably to make a commit. So it is a good idea to make a shortcut here as well.  Simply add the following code to Sublime's keybindings:\n\n```\n{ \"keys\": [\"ctrl+shift+c\"], \"command\": \"gs_commit\"},\n```\n\n`gs_commit` will open up the commit view in GitSavvy. If nothing is staged yet, it will assume the `-a` flag and select all changes. However, it will not include untracked files as is typical with Git. Within the commit view, you always see the diff of the changes to be committed at the bottom. Here, you can easily unstage or discard hunks or single lines directly using the keyboard shortcuts `[u]` and `[d]`.  Note that you can undo a discard by pressing `ctrl+z`.\n\n\n#### Pro-tip: Finding and Running (GitSavvy) Commands\n\nSometimes you may want to find out which commands to use, along with their optional arguments. You can use Sublime's console, which is a Python REPL, to help you with this.\n\nTo open the console in Sublime, press ``Ctrl + ` `` on Windows or Linux, or ``Cmd + ` `` on a Mac. This will open a panel at the bottom of the window where you can enter commands.\n\nTo enable logging of commands, enter the following command in the console:\n\n```python\nsublime.log_commands(True)\n```\n\nThis will cause Sublime to log all commands executed by the user in the console.\n\nNow, start GitSavvy's Command Palette (`ctrl+shift+p`) and run a command, such as `git: status`. After the command has executed, look at the console to see the name of the command and any optional arguments that were passed.\n\nFor example, you might see:\n\n```\ncommand: gs_commit {\"amend\": true}\n```\n\nHere, `gs_commit` is the name of the command, and the optional argument passed was `{\"amend\": true}`. This information can be useful for learning and customizing GitSavvy's functionality.\n\nDon't forget to turn off command logging when you're done, by entering:\n\n```python\nsublime.log_commands(False)\n```\n\nin the console.\n\n\n## Repo History\n\nGitSavvy's `Repo History` view provides a visual representation of a repository's commit history and is accessible via the `git: Repo History` command. It's similar to `gitk` but with more features. When editing a tracked file, you can alternatively use `git: File History` to open a file-specific history view. But you can also turn any standard `Repo History` view into a file/folder history view and vice versa by using `[l]` which opens up a list of all tracked files.\n\nThe `Repo History` view offers additional filtering options. Press `[a]` to toggle between showing *all* branches or only the currently checked out branch.  Press `[f]` to open the filter prompt, where you can add filters verbatim, like `--author=` or `-Sfoobar`.  You can use the up and down arrow keys to access a list of default filters or to see the history of filters you've previously used. Once you've filtered the graph, you can quickly toggle the filter on and off using `[F]`.\n\nPress `[s]` to enter a special \"overview\" mode showing only the tip of the branches and the tags.  (`[a]` in that mode will toggle the tags on and off too.)\n\nTo move around the commit graph, you can either use your mouse or the up and down arrow keys. If you want to make larger jumps in the graph, you can use the keyboard shortcut `alt+up` or `alt+down`, which jumps through the \"first-parent\" only.\n\nThe `Repo History` view has two main menus. Pressing `[enter]` will open the standard menu, which provides typical functionality such as checking out, cherry-picking, or reverting the currently selected commit. You can also find basic branch and tag functionality like creating or deleting them. Additionally, you can move branch pointers around (as opposed to resetting) or update branches from their upstream.\n\nYou can access a second menu by pressing `[r]`, which is specifically designed for rebasing. This menu allows you to reword commit messages (`[W]`), edit (`[E]`) or drop commits, apply fixups, and generally rebase anything onto anything. For example, you can extract a series of commits onto your main branch to make two feature branches out of a convoluted one.\n\n\u003ctable\u003e\n    \u003ctr\u003e\n        \u003ctd width=\"50%\"\u003e\n            \u003ca href=\"https://user-images.githubusercontent.com/8558/246386732-78eda8f2-c308-411f-ba57-c1294f97b32b.png\"\u003e\n                \u003cimg src=\"https://user-images.githubusercontent.com/8558/246386732-78eda8f2-c308-411f-ba57-c1294f97b32b.png\" width=\"100%\"\u003e\n            \u003c/a\u003e\n        \u003c/td\u003e\n        \u003ctd width=\"50%\"\u003e\n            \u003ca href=\"https://user-images.githubusercontent.com/8558/246387053-4c9d372d-017d-400a-a783-346905c86d37.png\"\u003e\n                \u003cimg src=\"https://user-images.githubusercontent.com/8558/246387053-4c9d372d-017d-400a-a783-346905c86d37.png\" width=\"100%\"\u003e\n            \u003c/a\u003e\n        \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd width=\"50%\"\u003eNote the visual connection between fixup commits and the commits they are associated with.\u003c/td\u003e\n        \u003ctd width=\"50%\"\u003eWhen the cursor is positioned on a fixup (or squash) commit, the `[r]`ebase menu will provide a specific action to apply that fixup.\u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\nYou can review any rebase afterwards.  E.g.\n\n\u003ctable\u003e\n    \u003ctr\u003e\n        \u003ctd width=\"33%\"\u003e\n            \u003ca href=\"https://user-images.githubusercontent.com/8558/246387264-b442cf0f-ab77-4694-a1ea-08d8e20a441a.png\"\u003e\n                \u003cimg src=\"https://user-images.githubusercontent.com/8558/246387264-b442cf0f-ab77-4694-a1ea-08d8e20a441a.png\" width=\"100%\"\u003e\n            \u003c/a\u003e\n        \u003c/td\u003e\n        \u003ctd width=\"33%\"\u003e\n            \u003ca href=\"https://user-images.githubusercontent.com/8558/246387423-a2f6b82f-cf65-4566-af23-78fbc47f1382.png\"\u003e\n                \u003cimg src=\"https://user-images.githubusercontent.com/8558/246387423-a2f6b82f-cf65-4566-af23-78fbc47f1382.png\" width=\"100%\"\u003e\n            \u003c/a\u003e\n        \u003c/td\u003e\n        \u003ctd width=\"33%\"\u003e\n            \u003ca href=\"https://user-images.githubusercontent.com/8558/246387583-9779f505-cdad-435a-8b65-3737845506eb.png\"\u003e\n                \u003cimg src=\"https://user-images.githubusercontent.com/8558/246387583-9779f505-cdad-435a-8b65-3737845506eb.png\" width=\"100%\"\u003e\n            \u003c/a\u003e\n        \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd width=\"33%\"\u003eOpen the `[r]`ebase menu again.  (The currently checked out branch is named \"which\" here.)\u003c/td\u003e\n        \u003ctd width=\"33%\"\u003eShow the previous tip of the currently checked out branch side by side.\u003c/td\u003e\n        \u003ctd width=\"33%\"\u003eShowing the main menu, maybe show a diff between both variants or undo by selecting \"Move ...\".\u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\nIf you encounter merge conflicts that need to be resolved manually, displaying the diff can help ensure that you haven't introduced \nany unintended changes or made mistakes.  (In most cases, the diff will be empty, indicating that both tips are identical in terms \nof code.)  From the main menu you can also choose to \"Move\" or to \"Reset\" the branch back to the previous tip, effectively undoing\nthe rebase.  \"Move\" will simply move the branch label, while \"Reset\" performs your typical reset operation that can also modify \nGit's staging area and discard uncommitted changes, depending on the mode you choose.  Usually choose \"Move\" here to undo a rebase.  \n\n\n## Line History\n\nGitSavvy has a feature called \"Line History,\" also known as git's \"wtf?\" view. This allows you to view the commit history of specific lines within the repository. It's a great way to quickly research the history of a particular piece of code before using the traditional `blame` view.\n\nTo access Line History, you can start on any normal view by selecting some lines, such as a function, and then issuing the `git: Line History` command from the command palette.  But really, you can start on any diff/patch that GitSavvy shows you.\n\nTo make it more seamless, I recommend, again, to make a shortcut. For example, you can add the following to your user keybindings:\n\n```\n  { \"keys\": [\"ctrl+shift+l\"], \"command\": \"gs_line_history\"},\n```\n\nOnce you have that, you can use `ctrl+l` to select some lines, followed by `ctrl+shift+l` to follow\nthose lines.\n\nGitSavvy will then show you snippets of commits/patches to show you the evolution of those lines.\n`[o]` on such an excerpt will open the complete commit.  `[O]` will display the version of the file\nas it existed at that specific point in time. And `[f]` for example will initiate a fixup commit\nfor the commit under the cursor.   (Either with the stage, or with all changes if nothing is staged\nyet, as usual.)\n\n*Tip*: The Line History is also available from any view where we show a diff or patch.  (It is thus\n available from within the Line History views.)  On such a view you don't necessarily have to\n select any lines, as it will select the current hunk for you by default, giving you\n the *\"hunk-history\"*, so to speak.\n\n*Even deeper*: After `[o]` or `[O]` you can navigate around in time with `[n]` (next) and `[p]`\n (previous).  You can show the commit's context using `[g]`, and the hunks context by opening the\n inline diff.  That's easier with more keybindings:\n\n```\n  { \"keys\": [\"ctrl+shift+,\"], \"command\": \"gs_inline_diff\" },\n  { \"keys\": [\"ctrl+shift+.\"], \"command\": \"gs_diff\", \"args\": {\"current_file\": true} },\n```\n\nThat's pretty crazy, right?  All views are connected, and you can really navigate around the\nhistory.\n\n\n## Git Diff View\nGitSavvy provides a `git diff` view that allows users to stage, unstage, and reset (discard) files, hunks, or individual lines.\n\n## Fixup/Squash Helpers\nGitSavvy offers fixup/squash helpers that can be accessed from various views, including the \"Line History\" view.\n\n## GitHub Integration\nGitSavvy provides GitHub integration that allows users to reference issues/collaborators when committing, open the current file or a commit on GitHub at the selected line, and create a new pull request from the current branch.\n\n## GitHub-Style Blame View\nGitSavvy offers a \"blame\" view that shows hunk metadata and allows users to view the commit that made the change, similar to GitHub's blame view.\n\n\n\n\n\n## Documentation\n\nThe documentation is probably outdated.  Yeah it's sad but you can contribute and I will eventually get onto it **but** every special view has help available, just press `?`.\n\nFeature documentation can be found [here](docs/README.md).  It can also be accessed from within Sublime by opening the command palette and typing `GitSavvy: help`.\n\n\n## Highlights\n\n\u003ctable\u003e\n    \u003ctr\u003e\n        \u003cth\u003eStatus dashboard\u003c/th\u003e\n        \u003cth\u003eTags dashboard\u003c/th\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd width=\"50%\"\u003e\n            \u003ca href=\"https://user-images.githubusercontent.com/8558/246819874-283e25d6-510a-4f33-ae24-1f57d533462d.png\"\u003e\n                \u003cimg src=\"https://user-images.githubusercontent.com/8558/246819874-283e25d6-510a-4f33-ae24-1f57d533462d.png\" width=\"100%\"\u003e\n            \u003c/a\u003e\n        \u003c/td\u003e\n        \u003ctd width=\"50%\"\u003e\n            \u003ca href=\"https://user-images.githubusercontent.com/8558/246406488-1b7013b0-36c0-4e8d-90bf-7814d5c8e180.png\"\u003e\n                \u003cimg src=\"https://user-images.githubusercontent.com/8558/246406488-1b7013b0-36c0-4e8d-90bf-7814d5c8e180.png\" width=\"100%\"\u003e\n            \u003c/a\u003e\n        \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd width=\"50%\"\u003eDisplay and overview and offer actions to manipulate your project state.\u003c/td\u003e\n        \u003ctd width=\"50%\"\u003eView and manipulate local and remote tags.\u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003ctable\u003e\n    \u003ctr\u003e\n        \u003cth\u003eDiff\u003c/th\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd width=\"50%\"\u003e\n            \u003ca href=\"https://user-images.githubusercontent.com/8558/290011169-1af9e0e4-aadd-4539-b7ac-d4979b9d0910.mp4\"\u003e\n                \u003cimg src=\"https://user-images.githubusercontent.com/8558/290011195-35d53963-fe57-4c46-b418-e8ed3bf02f54.gif\" width=\"100%\"\u003e\n            \u003c/a\u003e\n        \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd width=\"50%\"\u003eStage, unstage or discard hunks, files or individual lines. \u003ca href=\"https://user-images.githubusercontent.com/8558/290011169-1af9e0e4-aadd-4539-b7ac-d4979b9d0910.mp4\"\u003e(video)\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003ctable\u003e\n    \u003ctr\u003e\n        \u003cth\u003eGithub integration\u003c/th\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd width=\"50%\"\u003e\n            \u003ca href=\"https://user-images.githubusercontent.com/8558/246403219-313ca580-d4ea-4125-a10d-5f72ef6571ec.png\"\u003e\n                \u003cimg src=\"https://user-images.githubusercontent.com/8558/246403219-313ca580-d4ea-4125-a10d-5f72ef6571ec.png\" width=\"100%\"\u003e\n            \u003c/a\u003e\n        \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd width=\"50%\"\u003eReference issues and collaborators in commits.  Open files on GitHub in the browser, with lines pre-selected.  Create pull requests.  Fork a repository.\u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimbrel%2Fgitsavvy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimbrel%2Fgitsavvy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimbrel%2Fgitsavvy/lists"}