Repository: jesseduffield/lazygit (language: go)

Issue:
Git fast forward branch to remote fails when there's the same tag name
**Describe the bug**
Git fast forward branch to remote fails when there's the same tag name because we didn't specify the fetch command to be a branch.
This is pretty similar to #2546 

It failed with 
```
error: cannot update ref 'refs/head/<branch name>': trying to write non-commit object <tag hash with same branch name> to branch 'refs/heads/<branch name>'
```

**To Reproduce**
Steps to reproduce the behavior:

1. Create a tag that has the same name as the branch, and push it.
2. Try to fast forward the branch with same name to upstream

**Expected behavior**
The branch with the same name as the tag should be fast-forwarded successfully

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Version info:**
`lazygit --version: commit=v0.36.0, build date=2022-11-15T07:26:07Z, build source=binaryRelease, version=0.36.0, os=linux, arch=amd64, git version=2.38.1`
`git --version: git version 2.38.1`


Discussion / hints:
Sounds like an easy fix: Just a matter of updating `pkg/commands/git_commands/sync.go` `FastForward`, similar to what we did [here](https://github.com/jesseduffield/lazygit/pull/2548/files).

I'll chuck a 'good-first-issue' label on this. Do you feel up to the task @Neko-Box-Coder ?
@jesseduffield This is slightly different from before because git fetch doesn't have a branch specifier/option afaik

That's why I didn't suggest a change this time because the only way I can think of to get it work is to do a full reference so something like 

`git fetch "origin" "refs/heads/<branch name>":"<branch name>"`

If that works, then do we want to change most if not all the branch/tag reference strings in other places to be using "refs/heads/<branch name>" or "refs/tags/<tag name>" to prevent any future issues that are related to this?

What do you think? I am fine picking up the task if it is only changing `sync.go` but might not be suitable for changing all reference strings if you want to change all the reference strings.
I'm happy for us to change just this one place for now. 
Yeah no problem, I will create a PR for it. 

Fix patch:
diff --git a/pkg/commands/git_commands/sync.go b/pkg/commands/git_commands/sync.go
index 8eab2f7c862..360d40fe774 100644
--- a/pkg/commands/git_commands/sync.go
+++ b/pkg/commands/git_commands/sync.go
@@ -95,7 +95,7 @@ func (self *SyncCommands) Pull(task gocui.Task, opts PullOptions) error {
 		Arg("--no-edit").
 		ArgIf(opts.FastForwardOnly, "--ff-only").
 		ArgIf(opts.RemoteName != "", opts.RemoteName).
-		ArgIf(opts.BranchName != "", opts.BranchName).
+		ArgIf(opts.BranchName != "", "refs/heads/"+opts.BranchName).
 		GitDirIf(opts.WorktreeGitDir != "", opts.WorktreeGitDir).
 		ToArgv()
 
@@ -112,7 +112,7 @@ func (self *SyncCommands) FastForward(
 ) error {
 	cmdArgs := self.fetchCommandBuilder(false).
 		Arg(remoteName).
-		Arg(remoteBranchName + ":" + branchName).
+		Arg("refs/heads/" + remoteBranchName + ":" + branchName).
 		ToArgv()
 
 	return self.cmd.New(cmdArgs).PromptOnCredentialRequest(task).Run()


Test patch: