{{if eq .PullRequest.Flow 0}}
git fetch -u {{if ne .PullRequest.HeadRepo.ID .PullRequest.BaseRepo.ID}}{{else}}origin{{end}} {{.PullRequest.HeadBranch}}:{{$localBranch}}
git checkout {{$localBranch}}
{{else}}
git fetch -u origin {{.GetGitRefName}}:{{$localBranch}}
{{end}}
{{if .ShowMergeInstructions}}
git checkout {{.PullRequest.BaseBranch}}
git merge --no-ff {{$localBranch}}
git checkout {{.PullRequest.BaseBranch}}
git merge --ff-only {{$localBranch}}
git checkout {{$localBranch}}
git rebase {{.PullRequest.BaseBranch}}
git checkout {{.PullRequest.BaseBranch}}
git merge --no-ff {{$localBranch}}
git checkout {{.PullRequest.BaseBranch}}
git merge --squash {{$localBranch}}
git checkout {{.PullRequest.BaseBranch}}
git merge --ff-only {{$localBranch}}
git checkout {{.PullRequest.BaseBranch}}
git merge {{$localBranch}}
git push origin {{.PullRequest.BaseBranch}}
{{end}}