{{ctx.Locale.Tr "repo.pulls.cmd_instruction_hint" | Safe}}

{{ctx.Locale.Tr "repo.pulls.cmd_instruction_checkout_title"}}

{{ctx.Locale.Tr "repo.pulls.cmd_instruction_checkout_desc"}}
{{$localBranch := .PullRequest.HeadBranch}} {{if ne .PullRequest.HeadRepo.ID .PullRequest.BaseRepo.ID}} {{$localBranch = print .PullRequest.HeadRepo.OwnerName "-" .PullRequest.HeadBranch}} {{end}}
{{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}}

{{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_title"}}

{{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_desc"}}
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}}