Thursday, June 28, 2018

This was interesting, but I could not get it to work.

clone from a colleagues' branch using git command line commands at a Git Bash shell

  1. start with an empty folder and clone in the master stuff with git clone https://git@github.example.com:u000000/MyTools.git
  2. a folder will be made in the folder you pulled code down into... go one folder deep into that folder
  3. 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
  4. add a remote like so: git remote add MyTools git@github.example.com:u123456/MyTools.git
  5. 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:

  1. git clone git@github.example.com:u000000/MyTools.git
  2. cd MyTools
  3. git remote add myfriendlyname git@github.example.com:u123456/MyTools.git
  4. git remote -v
  5. git fetch myfriendlyname
  6. git checkout -b 3FOX myfriendlyname/myspecificbranch

No comments:

Post a Comment