Breaking old ties...
between UNIX files in different directories:
So I had the clever idea of hard-linking some of my init files to a git repo and storing the repo on GitHub so I can grab them for anywhere I have a login. (Here's the repo.)
So, for instance, I hard-link my .bash_profile in my home directory to the one in InitFiles, so whenever I update the script from any of the 6 or 7 machines I might login on, I can just pull it down to every other machine. (And I automate the pull each time I login.)
But... the link keeps "breaking." It works, and then a little later, it doesn't, and I have to delete the file from its "proper" login directory and re-link it to the repo version.
Any idea what I could be doing wrong? (OK, rob, I've just left you an opening you could drive a truck through...)
UPDATE: Rob Dodson (cover artist for EFRP, PUCK, A Song of the Past, and The Idea of Science, among other things) set me straight: I need symbolic links, not hard links. I had tried that, but just in the wrong direction: I had put the sym link in the git repo, and found git just stored the link, not the file linked to.
The link has been breaking because git removes files and then re-creates them when one does a pull.
So I had the clever idea of hard-linking some of my init files to a git repo and storing the repo on GitHub so I can grab them for anywhere I have a login. (Here's the repo.)
So, for instance, I hard-link my .bash_profile in my home directory to the one in InitFiles, so whenever I update the script from any of the 6 or 7 machines I might login on, I can just pull it down to every other machine. (And I automate the pull each time I login.)
But... the link keeps "breaking." It works, and then a little later, it doesn't, and I have to delete the file from its "proper" login directory and re-link it to the repo version.
Any idea what I could be doing wrong? (OK, rob, I've just left you an opening you could drive a truck through...)
UPDATE: Rob Dodson (cover artist for EFRP, PUCK, A Song of the Past, and The Idea of Science, among other things) set me straight: I need symbolic links, not hard links. I had tried that, but just in the wrong direction: I had put the sym link in the git repo, and found git just stored the link, not the file linked to.
The link has been breaking because git removes files and then re-creates them when one does a pull.
Comments
Post a Comment