Skip to content

Gitbutler pushing to the wrong remote #8491

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

Open
Dekker1 opened this issue May 12, 2025 · 3 comments
Open

Gitbutler pushing to the wrong remote #8491

Dekker1 opened this issue May 12, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@Dekker1
Copy link

Dekker1 commented May 12, 2025

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)

  1. Create a new GH repo user1/repo using a user 1.
  2. Make a fork user2/repo using user 2.
  3. Create a PR with user 1, where user 2 has edit permission.
  4. Clone the repository locally using user1/repo as fork remote and user2/repo as fork.
  5. Open repository using Gitbutler and set "target" to user1/main and "create branches on remote" to user2
  6. Open the created PR, make a change, commit, and "force push".

Expected behavior (Optional)

  1. Changes to appear in user1 and added as additional commits to the relevant PR.

Relevant log output (Optional)

@Dekker1 Dekker1 added the bug Something isn't working label May 12, 2025
@Byron
Copy link
Collaborator

Byron commented May 12, 2025

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.

@Dekker1
Copy link
Author

Dekker1 commented May 12, 2025

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.

@Byron
Copy link
Collaborator

Byron commented May 12, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants