Skip to content

Instantly share code, notes, and snippets.

View viralsolani's full-sized avatar
🎯
Focusing

Viral Solani viralsolani

🎯
Focusing
View GitHub Profile
@sgnl
sgnl / add-upstream.md
Last active October 3, 2023 22:51
So you've forked a Repository and you want updates...

#tl;dr

setting up a branch to track a repo

pre: assuming you have forked a repo and cloned your fork to your computer

  1. git remote add [maintainer's name] [paste URL here]
  2. git fetch --all
  3. git branch --track [maintainer's name]_[branch] [remote name from step 1]/[branch you want to track] At this point you may watch to checkout to your newly create branch and issue a git pull command.
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream