With custom commands, you are one shortcut away to run commands thanks to the Quick Launch (Ctrl+P, ⌘+P).
Custom commands can be configured in File > Preferences > Custom commands, or by editing the json file custom-commands.json located in AppData/Local/Fork on Windows and ~/Library/Application Support/com.DanPristupov.Fork/custom-commands.json on MacOS.
Please share your own custom commands :)
Fork commands are posted as comments on this gist. Press CTRL+F to search for commands.
Then, copy-paste the commands you need in custom-commands.json.
Make sure to close Fork before editing the json file.
Amend
Amend your staged changes into the last commit.
{ "name": "Amend", "target": "repository", "action": { "type": "process", "path": "$git", "args": "commit --amend --no-edit", "showOutput": false, "waitForExit": true } }Commit summary
{ "name": "Commit summary", "target": "repository", "action": { "type": "process", "path": "$git", "args": "show --compact-summary", "showOutput": true, "waitForExit": true } }For a specific file type:
{ "name": "C# Commit summary", "target": "repository", "action": { "type": "process", "path": "$git", "args": "show --compact-summary *.cs", "showOutput": true, "waitForExit": true } }Show branches containing the selected commit
{ "name": "Which branches contain this commit", "target": "revision", "action": { "type": "process", "path": "$git", "args": "branch -a -r --contains $SHA", "showOutput": true, "waitForExit": true } }Show unmerged branches
{ "name": "Show Unmerged Branches", "target": "repository", "ui": { "title": "Show Unmerged Branches", "description": "Which branch do you want to check for unmerged branches?", "buttons": [ { "title": "develop", "action": { "type": "process", "path": "$git", "args": "branch --no-merged origin/develop -a", "showOutput": true, "waitForExit": true } }, { "title": "master", "action": { "type": "process", "path": "$git", "args": "branch --no-merged origin/master -a", "showOutput": true, "waitForExit": true } } ] } }