Closed
Description
When working in a typical open-source workflow (for example when contributing to SourceGit on GitHub), there are often two remotes:
- our own forked repo (
origin
) - the master-repo (
upstream
)
After a Fetch
(from all remotes), the origin
branches are often lagging behind the corresponding upstream
branches. To sync an origin
branch against its upstream
, we can use Open In Browser
in SourceGit (on the origin
remote) and then (on the GitHub repo web page) select "Sync fork (origin) branch with upstream". However, it would be nice if this operation could be performed without leaving the SourceGit UI (at least when fast-forward is possible).
Possible (minimal/partial) implementation:
- Right-clicking a remote branch
origin/develop
gives the optionFast-forward to upstream/develop
(similar to how it works for local branches). - Other variants for syncing between two remote branches could be added later, but fast-forward is arguably the most common and trivial use-case.
- At least initially, it could be assumed that the remote and upstream branch needs to have the same name in order to be synced?
- To establish which remote is the upstream, we may need to split the
Default Remote
dropdown (inRepository Configure
) into two separate ones:Default Remote Origin
andDefault Remote Upstream
. - Alternatively, a sub-menu per remote could be used (similar to the one used per branch/tag when right-clicking in the log-graph) to enable syncing between arbitrary pairs of remotes (which may not be as "safe" as requiring configuration of a dedicated Origin + Upstream).