git push currect folder contents to a remote git repo's subfolder

时间:2019-05-31 12:22:33

标签: git

I have a current folder whose contents I want to push to an existing remote git repo but in a subfolder

I don't think submodules and subtree since those assume different remote repo. I have only one remote repo.

Machine A:
/home/userA/tools

I want the content of the above folder be sync to the remote repo's subfolder. e.g.

https://git.company.com/projectA/machine-scripts.git
/machineA/Scripts <--sync with the /home/ubuntu/tools above
/machineB/Scripts <--sync with different machine's /home/userB/tools

The idea is to have folder's from different machine or users have corresponding folder to single remote repo, but not necessarily following or enforcing remote repo's folder structure.

Thanks in advance.

0 个答案:

没有答案