Skip to content

Instantly share code, notes, and snippets.

@d2s
Created June 20, 2019 18:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save d2s/e767e2f49c07cb3381b382cd7c8ff453 to your computer and use it in GitHub Desktop.
Save d2s/e767e2f49c07cb3381b382cd7c8ff453 to your computer and use it in GitHub Desktop.
Pull changes from an upstream Git repository
#!/usr/bin/env bash
# Add `upstream` Git repository
# git remote add upstream https://github.com/d2s/companies.git
# Merge latest changes from the `upstream` Git repository
git fetch upstream
git checkout master
git merge upstream/master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment