Notes

Git - Keep your fork up-to-date with the original repository

author: Paul Kim

categories: git

tags: git

Keep your fork up-to-date with the original repository

I have a fork of a repo that I want to keep up-to-date. The repo is for GatsbyJS.

Here is the information:

  • original repo: git@github.com:gatsbyjs/gatsby.git
  • my forked repo: git@github.com:kimbaudi/gatsby.git
# clone your fork
git clone git@github.com:kimbaudi/gatsby.git

# in your fork, add remote from original repository
git remote add upstream git://github.com/gatsbyjs/gatsby.git

# fetch, merge, push
git fetch upstream
git merge upstream master
git push

# or pull, push
git pull upstream master
git push
Source

Keeping a for up to date


ChromeEdgeFirefoxOpera

© 2021 paulkode.com. All rights reserved.