gitbutler icon indicating copy to clipboard operation
gitbutler copied to clipboard

Allow pushing to a PR remote branch directly (Branch pushed to origin instead of fork)

Open Byron opened this issue 2 months ago • 0 comments

Version

0.16.8

Operating System

macOS

Distribution Method

dmg (Mac OS - Apple Silicon)

Describe the issue

GitButler pushes a new branch to origin when adding a commit to a branch of a fork. To reproduce: apply a PR to the workspace from a fork, make a commit, and push the branch; it's now on origin, but it should be on the fork. This is unexpected and breaks the expected workflow for contributing from forks.

How to reproduce (Optional)

  1. Apply a PR to the workspace from a fork
  2. Make a commit
  3. Push the branch
  4. Observe that the branch appears on origin rather than the fork

Expected behavior (Optional)

The commit should be pushed to the fork branch, not to origin. This allows proper PR workflows between fork and upstream.

Other related notes

Taken from #9664

By @peaklabs-dev

Currently when we authenticate with GitHub and check out a community PR, GitButler adds a new remote.

After I finish testing the PR locally, I often need to make small tweaks, like formatting for example and I would like to push them straight into the PRs source branch. Instead of doing that GitButler creates a branch with the same name on my origin which isn’t what I want. I want to push to the source branch of the PR (the branch where the PR was opened from) then after that I want to merge all changes into my target branch from the PR. It would be great if this would be an option or the new default, so my added commits go straight to the remote source branch not create a new branch on my origin which then means I have to create another PR which is just inconvenient.

Technically, this could probably be achieved by changing the remote configuration to the PR details, each time a PR is reviewed, but this is just very inconvenient and slow.

Byron avatar Oct 09 '25 03:10 Byron