Skip to content

Instantly share code, notes, and snippets.

@pablolazaro
pablolazaro / pr.md
Last active August 29, 2015 14:25 — forked from piscisaureus/pr.md
Checkout Stash pull requests locally

Locate the section for your Stash remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = https://your.stash.domain/stash/scm/project/repo.git

Now add the line fetch = +refs/pull-requests/*/from:refs/remotes/origin/pr/* to this section. Obviously, change the Stash url to match your project's URL. It ends up looking like this:

[
{ "keys": ["f12"], "command": "htmlprettify"},
{ "keys": ["f1"], "command": "fold" },
{ "keys": ["f2"], "command": "unfold" },
{ "keys": ["ctrl+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },
{ "keys": ["ctrl+space"], "command": "auto_complete" },
{ "keys": ["ctrl+space"], "command": "replace_completion_with_auto_complete", "context":
[
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },