clone from a colleagues' branch using git command line commands at a Git Bash shell
- start with an empty folder and clone in the master stuff with git clone https://git@github.example.com:u000000/MyTools.git
- a folder will be made in the folder you pulled code down into... go one folder deep into that folder
- at the GitHub web interface, have your coworker go to his profile and from there drill into his repository, not the master repository, to get the path to his stuff
- add a remote like so: git remote add MyTools git@github.example.com:u123456/MyTools.git
- pull down code from the remote: git clone https://git@github.example.com:u123456/MyTools.git
Addendum 6/29/2018: These commands give an example of doing this for real:
- git clone git@github.example.com:u000000/MyTools.git
- cd MyTools
- git remote add myfriendlyname git@github.example.com:u123456/MyTools.git
- git remote -v
- git fetch myfriendlyname
- git checkout -b 3FOX myfriendlyname/myspecificbranch
No comments:
Post a Comment