Wednesday, June 27, 2018

prep a new project when pulling from GitHub with Git Bash allowing for long path names

  1. make a new folder for keeping the stuff... let's say it is C:\PlayPlace
  2. clone in the project with git clone git@github.example.com:my-Project/MyTools.git
  3. assuming your stuff came down in a folder named "MyTools" shall we say, then go to C:\PlayPlace\MyTools in Windows Explorer
  4. close the Git Bash shell and open a new Git Bash shell at C:\PlayPlace\MyTools from the Windows folder
  5. run git remote -v and you will probably see two lines for origin and none for source
  6. run git remote add source git@github.example.com:my-Project/MyTools.git
  7. rerun git remote -v and you should see two entries for origin and two for source, four in total
  8. now go to C:\PlayPlace\MyTools\.git in Windows Explorer to reveal a hidden folder
  9. open the "config" file and add longpaths = true under [core] not [remote "origin"] nor [branch "master"]
  10. run git pull --rebase source master to get the files you could not get before which have long path names

No comments:

Post a Comment