Skip to content

Instantly share code, notes, and snippets.

@scalone
Created December 12, 2015 02:25
Show Gist options
  • Save scalone/8b84c4d67688876d36e2 to your computer and use it in GitHub Desktop.
Save scalone/8b84c4d67688876d36e2 to your computer and use it in GitHub Desktop.
# From differents repositories
git remote add <remote name> <address> # example `git remote add scalone [email protected]:scalone/mruby-miniz.git`
git fetch <remote name> # To get all commits from repo.
git checkout -tb <branch name> <remote name>/<remote branch name> # example `git checkout -tb change1 scalone/change1`
# test ...
# Same repository
git fetch <remote name> # To get all commits from repo.
git checkout -tb <branch name> <remote name>/<remote branch name> # example `git checkout -tb change1 origin/change1`
# test ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment