I have some project, which I share with other people. It is stored and distributed in git.
It should contain links to directories outside the git archive, but inside th user home, where some common libraries are, like this:
Arduino -> /home/gilhad/GitHub/arduino-1.8.1
Arduino-Makefile -> /home/gilhad/GitHub/Arduino-Makefile
Bare-Arduino-Project -> /home/gilhad/GitHub/Bare-Arduino-Project
It works for me (gilhad), but does not work for my friend. I would like to make links like this:
Arduino -> ~/GitHub/arduino-1.8.1
Arduino-Makefile -> ~/GitHub/Arduino-Makefile
Bare-Arduino-Project -> ~/GitHub/Bare-Arduino-Project
which would effectively resolve to the previous on my account and to following on friends account
Arduino -> /home/friend/GitHub/arduino-1.8.1
Arduino-Makefile -> /home/friend/GitHub/Arduino-Makefile
Bare-Arduino-Project -> /home/friend/GitHub/Bare-Arduino-Project
(regardless where this git/actual directory is actually placed , so ../../../GitHub/....
as target would not work, as the project can be placed in ~/tmp
as well as in ~/my/special/folder/for/projects
, while GitHub
is always placed in users home direcory (/home/gilhad
or /home/friend
or what ~
points to)
~
is a shell thing. The file system doesn't know what~
is. I wonder why the other people can be forced to put the GitHub at a fixed location, but not the repo. – Philippos Mar 16 '17 at 08:41ln -s '~/GitHub/arduino-1.8.1' A2
wherels -al
showsA2 -> ~/GitHub/arduino-1.8.1
in red andA2
looks like broken link – gilhad Mar 16 '17 at 08:43~/GIT/common_projects
directory, but often copy/clone it to~/tmp
for some wild experiments, use it there for a day or two and delete it later, or merge with official depending on result (I know about branches, but when I try to rearrange history and fail, or something like that.. or just want to use 'copy' of the project to run some tests in the same environment and delete them later) – gilhad Mar 16 '17 at 08:50