Skip to content

Instantly share code, notes, and snippets.

@toyowata
Created June 26, 2020 02:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toyowata/8b3084ba26edb46456f41c2c12a0fa1b to your computer and use it in GitHub Desktop.
Save toyowata/8b3084ba26edb46456f41c2c12a0fa1b to your computer and use it in GitHub Desktop.
Create GitHub repo and fetch from other repo

Create GitHub repo

https://github.com/toyowata/test_00

Create local repo

$ git init test_00
$ cd test_00

Fetch remote repo

$ git remote add upstream git@github.com:armmbed/mbed-os.git
$ git fetch upstream

Merge to local repo

$ git merge upstream/master
$ ls

Create remote repo and push

$ git remote add test_00 https://github.com/toyowata/test_00
$ git push --set-upstream test_00 master

Create branch and push commit

$ git checkout -b branch_01
$ git push --set-upstream test_00 branch_01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment