Skip to content

Instantly share code, notes, and snippets.

View junagao's full-sized avatar

juliane nagao junagao

View GitHub Profile
@junagao
junagao / git-move-fork-after-cloning.md
Last active March 26, 2019 17:38 — forked from jagregory/gist:710671
Git: How to move to a fork after cloning

Git: How to move to a fork after cloning

So you've cloned somebody's repo from github, but now you want to fork it and contribute back.

Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy.

  • Off the top of my head *

1. Fork their repo on Github

@junagao
junagao / git-keeping-fork-up-to-date.md
Last active June 29, 2020 14:52 — forked from CristinaSolana/gist:1885435
Git: Keeping a fork up to date

Git: Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo

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

git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git