Skip to content

Instantly share code, notes, and snippets.

@plouh
Last active August 29, 2015 14:07
Show Gist options
  • Save plouh/90438f9d42f38577f4ea to your computer and use it in GitHub Desktop.
Save plouh/90438f9d42f38577f4ea to your computer and use it in GitHub Desktop.
# Add PhoneSM as a new remote and fetch it:
➜ MyHlsProject git:(master) ✗ git remote add phonesm_remote https://git01.codeplex.com/phonesm
➜ MyHlsProject git:(master) ✗ git fetch phonesm_remote
warning: no common commits
remote: Counting objects: 8796, done.
remote: Compressing objects: 100% (1897/1897), done.
remote: Total 8796 (delta 7245), reused 8109 (delta 6669)
Receiving objects: 100% (8796/8796), 5.23 MiB | 115.00 KiB/s, done.
Resolving deltas: 100% (7245/7245), done.
From https://git01.codeplex.com/phonesm
* [new branch] master -> phonesm_remote/master
From https://git01.codeplex.com/phonesm
* [new tag] phonesm-1.2-alpha -> phonesm-1.2-alpha
* [new tag] phonesm-1.2-alpha2 -> phonesm-1.2-alpha2
* [new tag] phonesm-1.2.2 -> phonesm-1.2.2
* [new tag] phonesm-20130502 -> phonesm-20130502
* [new tag] phonesm-20130513 -> phonesm-20130513
* [new tag] phonesm-20130907 -> phonesm-20130907
* [new tag] phonesm-20130921 -> phonesm-20130921
# Next create a branch where you check out the sources locally
➜ MyHlsProject git:(master) ✗ git checkout -b phonesm_branch phonesm_remote/master
Checking out files: 100% (2559/2559), done.
Branch phonesm set up to track remote branch master from phonesm_remote.
Switched to a new branch 'phonesm_branch'
# Go back to master
➜ MyHlsProject git:(phonesm_branch) ✗ git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
# And add PhoneSM as a subtree for easier way to pull updates later
➜ MyHlsProject git:(master) git read-tree --prefix=phonesm/ -u phonesm_branch
➜ MyHlsProject git:(master) ✗
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment