question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Request: Sync with upstream repository

See original GitHub issue

When working on an upstream repository, I will clone that into my own GitHub (origin) then connect that repository to Desktop. I only ever want to work on origin/branch, but want to keep the origin/master in sync with the upstream/master.

The only way I have found (assuming I have added the upstream already) is to, from the CLI, do

git pull upstream master
git push origin master

Being able to do this more easily would really help (I have to look it up every time).

ref #3199 - upstream url added automatically - great.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
shiftkeycommented, Feb 19, 2019

@borpin some extra context on the flow you went through:

You can see here there is a dropdown arrow which is telling me I am 103 commits behind.

image

This arrow is used to show the ahead/behind details for your current branch, using tracking branch set in configuration (this will likely be on origin).

If I click on the arrow

This icon is not intended to be clickable, but this is an interesting bit of feedback about the UX.

image

Ah, it says origin remote, I’d expect it to say upstream (I’d thought origin was always the fork).

This is a new action that was added as part of #6445 and is also based on your current tracked branch. Git doesn’t support tracking multiple branches, so this is where our prompt about “Your branch is XYZ commits behind [default branch]” comes in.

I’ve opened #6875 as a proposal to make this flow more intuitive, and I’d love to hear your input there based on your current experiences with working with forks in the app.

There is the Origin in the Repository settings, but no option to include an upstream. image

Desktop should be adding an upstream remote for the fork once it’s tracked in the app, if it’s a GitHub repository. I’ve opened #6877 to discuss making this more prominent in the UI.

I’m going to close this out as I think those are the fork-specific issues worth discussing in more detail, but feel free to open fresh issues if there are other things you would like to see improved about how we handle forks in the app.

0reactions
borpincommented, Feb 16, 2019

Just opened a repo that I forked a while ago. GitHub web shows

image

But I am getting nothing in Desktop that indicates this (not even the arrow in the ‘Current Repository’ dropdown). I saw an issue regarding Desktop asking about adding in the remote upstream when a repository was cloned, but I did not see that as an option.

There is the Origin in the Repository settings, but no option to include an upstream. image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Syncing a fork - GitHub Docs
On GitHub, navigate to the main page of the forked repository that you want to sync with the upstream repository. · Select the...
Read more >
How do I update or sync a forked repository on GitHub?
Go to your fork, click on Fetch upstream , and then click on Fetch and merge to directly sync your fork with its...
Read more >
How to sync your fork with the original repository - Lj Miranda
To add, Github's “Fetch upstream” button performs a merge, making further Pull Requests dirty and riddled with stray commits—the worst case ...
Read more >
How to Sync and Update a Forked Repository - Section.io
This article demonstrates how to sync and update a forked repo using GitHub desktop and Git bash with examples.
Read more >
3 Ways to Sync a Forked Repository on GitHub ...
Keeping your forked repo in sync with the upstream one is something tedious, and to do it usually we have to use the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found