Created
July 4, 2013 13:36
-
-
Save atupal/5927782 to your computer and use it in GitHub Desktop.
How to get git to follow symlinks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
what i did to add to get the files within a symlink into git (i didn't use a symlink but): | |
sudo mount --bind SOURCEDIRECTORY TARGETDIRECTORY | |
do this command in the git managed directory. TARGETDIRECTORY has to be created before the SOURCEDIRECTORY is mounted into it. | |
works fine! that trick helped me with subversion too. i use it to include files from an Dropbox account, where a webdesigner does his stuff. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Git by default attempts to store symlinks instead of following them ( for compactness and its generally what people want ) | |
However, i accidentally managed to get it to add files beyond the symlink when the symlink is a directory. | |
ie: | |
/foo/ | |
/foo/baz | |
/bar/foo --> /foo | |
/bar/foo/baz | |
by doing | |
git add /bar/foo/baz | |
appeared to work when i tried it, that behavior was however unwanted by me at the time, so I Cant give you info beyond that. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment