Reputation: 1011
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 ?
Upvotes: 3
Views: 4390
Reputation: 1326842
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.
Upvotes: 2