Skip to content

Instantly share code, notes, and snippets.

@deomorxsy
Last active March 6, 2024 00:33
Show Gist options
  • Save deomorxsy/477190c107f9bf0453491b98c3ff0319 to your computer and use it in GitHub Desktop.
Save deomorxsy/477190c107f9bf0453491b98c3ff0319 to your computer and use it in GitHub Desktop.
commands to update the git repo fork from the upstream
# check the origin
git ls-remote --get-url origin

# add remote
## for configured SSH environments as remote connection:
git remote add upstream [email protected]:{user/org}/repo.git
## for for configured HTTPS environments as remote connection:
git remote add upstream https://github.com/{user/org}/repo.git

# check remote
git remote -v

git fetch upstream
git rebase upstream/main
git pull --all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment