Gitbutler pushing to the wrong remote
Version
0.14.19
Operating System
macOS
Distribution Method
dmg (Mac OS - Apple Silicon)
Describe the issue
I'm running Gitbutler with the "target" pointing to a common upstream repository upstream (owned by an organisation) and my "create branches on remote" is set to fork (my personal fork).
When working on PRs, everything work well until I press the "Force push" button. Rather than pushing to the origin (or other external fork of the repository), it will instead push to a new branch on fork. This is then unrelated to the PR that I'm actually working on.
How to reproduce (Optional)
- Create a new GH repo
user1/repousing a user 1. - Make a fork
user2/repousing user 2. - Create a PR with user 1, where user 2 has edit permission.
- Clone the repository locally using
user1/repoasforkremote anduser2/repoasfork. - Open repository using Gitbutler and set "target" to
user1/mainand "create branches on remote" touser2 - Open the created PR, make a change, commit, and "force push".
Expected behavior (Optional)
- Changes to appear in
user1and added as additional commits to the relevant PR.
Relevant log output (Optional)
Thanks a lot for reporting!
This looks like a somewhat complex setup and I am probably not following exactly what this would imply for the GitButler remote setup, but it seems like some part of the configuration is 'confused'. Maybe for @krlvi the issue seems clearer though.
I'm not sure whether this is as complex a situation as it might seem. I think many maintainers will run into the situation where they will change PRs before merging them. Essentially, my expectation is just that when I work on a branch from a specific remote, that any changes I make would be pushed back to that remote.
Essentially, my expectation is just that when I work on a branch from a specific remote, that any changes I make would be pushed back to that remote.
Sorry for potentially misrepresenting this issue as complex after reading the reproduction guide. Indeed, when phrased like this I'd absolutely share that expectation.