Skip to content

Instantly share code, notes, and snippets.

@jakub-frajt
Last active October 8, 2021 19:24
Show Gist options
  • Save jakub-frajt/12287df0982534b2b4d35b34770fb49a to your computer and use it in GitHub Desktop.
Save jakub-frajt/12287df0982534b2b4d35b34770fb49a to your computer and use it in GitHub Desktop.
Sublime Merge custom commands
[
{
"caption": "Fixup",
"command": "git",
"args": {"argv": ["commit", "--fixup", "HEAD"]}
},
{
"caption": "Stage All",
"command": "git",
"args": {"argv": ["add", "."]}
},
{
"caption": "Rebase and autosquash",
"command": "git",
"args": {"argv": ["rebase", "-i", "--autosquash", "master"]}
},
{
"caption": "Amend previous commit",
"command": "git",
"args": {"argv": ["commit", "--reuse-message=HEAD", "--amend"]}
}
]
@tukusejssirs
Copy link

Thanks for sharing!

Just two notes:

  • You neeed to save this file to ~/.config/sublime-merge/Packages/User (on Linux; use PreferencesBrowse Packages… to open the Packages folder, then open User folder). Also make sure that the file name is Default.sublime-commands`.
  • "args": {"argv": ["add", "."]} can re replaced with ``"args": {"argv": ["add", "-all"]}`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment