Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git config branch.autosetupmerge: always is not optimal #19

Open
shauntarves opened this issue Nov 13, 2023 · 2 comments
Open

git config branch.autosetupmerge: always is not optimal #19

shauntarves opened this issue Nov 13, 2023 · 2 comments

Comments

@shauntarves
Copy link

Hi there,

https://github.com/strapsh/strap/blob/master/cmd/run#L193 has [may be] unintended consequences. In simple workflows that use a local branch with a remote branch of the same name, having autosetupmerge requires that the branch be created on the remote first (or always use --no-track with a git branch command).

I'm curious about the motivation for having this set and whether you would be willing to remove this setting if I created a PR for it.

@lhazlewood
Copy link
Contributor

Hi Shaun!

It was mostly due to convenience since most people have repositories on the origin before using strap.

What would be the repercussions of removing the line?

@shauntarves
Copy link
Author

The repercussion would be that the user would have to use set-upstream on their git push if they HADN'T already checked out from remote. If your workflow already involves having a branch on the origin and you check that out, then nothing extra is needed.

The way I look at it, if you don't have a remote branch already, autosetupmerge kind of screws up your local branch, but if you're used to creating and pulling remote branches before you work, removing autosetupmerge has no effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants