How do I sync a (different named) directory with an existing github repo?

I want to modify a repo from two sources: windows OS and Ubuntu OS (Dual booting on a laptop). The repo contains files from my Arduino library directory (I'm using the repo as a place to keep changes to the library the same across OS).

Is it possible for me to get the content of the repo without having to rename the arduino library directory name (Arduino software looks for a folder called 'libraries' so I can't change its name).


When you clone a repo, git defaults to placing it inside a folder with the same name as the repo, but this is not required. You can name it whatever you want. So you likely want to run some git clone git@github.com:/your/repo libraries to get the repo content in that path.

You can also rename the repo folder after cloning if you already have it but need the path to be different on your system.

I'm not sure if you have everything in libraries checked in or not, but if you have only certain directories in git you might be able to keep the repo somewhere else on disk and symlink from libraries/library1 -> /path/to/your-repo/library1

链接地址: http://www.djcxy.com/p/90510.html

上一篇: 需要处理git

下一篇: 如何将一个(不同的名称)目录与现有的github repo同步?