Same file in different locations in GIT

此生再无相见时 提交于 2020-07-07 16:00:47

问题


How to add a same file in different locations in GIT on same branch If i update in one place it should reflect in other place also

Here is the flow

file a.txt under directory "DIR 1" and i need same file under directory "DIR 2 "

If I commit /update anything on a.txt it should reflect two places.

I used symbolic links no use is there any way to get it down ?


回答1:


Symbolic links are one correct way, but on Windows, you need to be careful as how you register them in your Git repo:

See "Git Symlinks in Windows", for the right post-checkout script in order to correctly update/restore the content referenced by those symlinks.



来源:https://stackoverflow.com/questions/20877917/same-file-in-different-locations-in-git

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!