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.

After I have cloned my repositories and there are some forks I would like to syncing them with upstream. As I see after the cloning the remote is not set (checking with git remote -v). Is it my task to add remote repository with git remote add [upstream] [git-url] in my forks, or can it be automated with all-repos?

My usual workflow is (maybe not the best): 1, clone my fork 2, add upstream repository as a remote 3, sync with upstream (git fetch --all, git merge upstream/master, git push origin master) 4, create my topic branch + add code + create a PR from it

If the step 4 does not take a short time I would like to sync/rebase my topic branch with the master periodically. I have seen the push-module maybe it could help me in creating a PR, but will it help in syncing?

So my questions: 1, can all-repos-clone automatically add repository from which I forked from as a remote? or is it a users task? 2, can all-repos help me to sync master (or other branches) from time to time with upstream?

Thank you

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
mitzkiacommented, Mar 5, 2019

I think I have no other questions right now to this topic -> so I am closing this.

0reactions
johndpopecommented, Jul 24, 2019

so from this gist https://gist.github.com/CristinaSolana/1885435

these are the commands to sync a remote fork back to local fork - I will get around to making this a full script one day…

git clone https://github.com/pandas-dev/pandas (REPO_URL)
cd pandas
git remote add upstream https://github.com/pandas-dev/pandas.git ( parent.git_url)
git fetch upstream
git checkout master
git pull upstream master
git add -A
git commit -m "Sync upstream master with master branch"
git push origin master

DRAFT https://gist.github.com/johndpope/c859925603e8f176318c1d28a1dca6fc

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 to Sync Your Fork with the Original Git Repository
Everything is now set up. You can sync your fork with only 2 commands. Be sure you're in the root of your project...
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
Our fork is now fully-synced with the original repository. The commits should match one-to-one, without merge commits nor strays . This is ...
Read more >
Sync a GitHub Repo: How To Ensure Your GitHub Fork Is Up ...
Click on the New pull request button to begin the pull request. On the new page, choose your fork as the base fork...
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