Open gabriGutiz opened 2 weeks ago
You can unset the upstream from the menu under u
.
The default behavior is that the local branch tracks the upstream, which is nifty for most use cases.
I was able to change the upstream, but in my case makes more sense to not set the upstream. I want to make a task based on a teammate's change without changing his branch.
Is that a way to change this default behavior locally?
I think I would be fine with changing the n
command to not automatically track the remote branch. I find it unlikely that people want to create a branch with a different name that still tracks the remote branch; and for creating a branch with the same name that tracks the remote branch, they can use space
instead.
@gabriGutiz In the meantime, a workaround is to hit enter on the remote branch to see its commits, and then hit n
on the head commit; this will create a local branch that doesn't track anything.
Thanks, @stefanhaller! I'll use this workaround so on.
Just adding that I agree with what you said, It's a little annoying that I have to delete the upstream to not make a mess by mistake or do what you described!
Thanks for the attention!!
I think I would be fine with changing the n command to not automatically track the remote branch. I find it unlikely that people want to create a branch with a different name that still tracks the remote branch; and for creating a branch with the same name that tracks the remote branch, they can use space instead.
I agree
Describe the bug When creating a new branch from a remote one, the new branch remote track is the same as the old one.
To Reproduce Steps to reproduce the behavior:
Expected behavior When pushing to the new branch, should ask the remote upstream branch instead of pushing to the old branch.
Screenshots![image](https://github.com/jesseduffield/lazygit/assets/82330800/3be05358-08d0-43ed-81df-153722736097)
For context: feature/CAN-4068 is the remote branch I did the checkout from.
Version info: commit=6fcb7eb8bb616c170506312870b3bf15f3dbe37c, build date=2024-05-19T10:15:28Z, build source=binaryRelease, version=0.42.0, os=windows, arch=amd64, git version=2.45.0.windows.1 git version 2.45.0.windows.1