{{$.locale.Tr "repo.pulls.merge_instruction_hint" | Safe}}

{{$.locale.Tr "step1"}}

{{$.locale.Tr "repo.pulls.merge_instruction_step1_desc"}}
{{if eq $.Issue.PullRequest.Flow 0}}
git checkout -b {{if ne $.Issue.PullRequest.HeadRepo.ID $.Issue.PullRequest.BaseRepo.ID}}{{$.Issue.PullRequest.HeadRepo.OwnerName}}-{{end}}{{$.Issue.PullRequest.HeadBranch}} {{$.Issue.PullRequest.BaseBranch}}
git pull {{if ne $.Issue.PullRequest.HeadRepo.ID $.Issue.PullRequest.BaseRepo.ID}}{{else}}origin{{end}} {{$.Issue.PullRequest.HeadBranch}}
{{else}}
git fetch origin {{$.Issue.PullRequest.GetGitRefName}}:{{$.Issue.PullRequest.HeadBranch}}
{{end}}

{{$.locale.Tr "step2"}}

{{$.locale.Tr "repo.pulls.merge_instruction_step2_desc"}}
git checkout {{$.Issue.PullRequest.BaseBranch}}
git merge --no-ff {{if ne $.Issue.PullRequest.HeadRepo.ID $.Issue.PullRequest.BaseRepo.ID}}{{$.Issue.PullRequest.HeadRepo.OwnerName}}-{{end}}{{$.Issue.PullRequest.HeadBranch}}
git push origin {{$.Issue.PullRequest.BaseBranch}}