You are not logged in.
Pages: 1
Heyas
For plain local work, this would not be an issue for me to ask, however, as i share them, i'd like to be sure. (but me dont want to do 2 git pushes just to try for real)
I have a single script that manages the installations for my scripts, it uses a single configuration file.
Now during updates of that, for the testinig, i usualy install (one of) my other projects over and over again.
Figured a theory, hardlink from the 'installer script' to the current project, lets me skip the copy of it.
While beeing all local, i know all those hardlinks refer to the same content('node'), and as long any of those remains, the original data remains.
My question now is, what happens if i push such a hardlink to github and someone clones that from there?
Will they get the 'real' file, or just an invalid/broken hardlink (as it does with 'ln -s' if that goes out of the project dir)?
Thanks
Last edited by esa (2015-10-01 10:52:22)
Offline
Git treats hardlinks like normal files (they are normal files), so pushing the data works. Since git is not aware of hardlinks, you will break the connection if you modify your working copy (e.g. with checkout or reset --hard).
Edit: So yes, git breaks hard links. This will result in you having two copies of the same file and not in a data loss.
Last edited by progandy (2015-10-01 10:43:03)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
If you want to recreate a local hardlink, then you can try to add a post-checkout hook to your working copy.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
Pages: 1