I want to add an external directory to an existing repository.
External Dir: /home/some/directory
Working Dir: /htdocs/.git
If I attempt the followin
If the code that you want to add to your repo is not too big, you could also automatically copy it to your repo each time before you push.
In my case I for example need one R file, which I modify quite often, in several repos and I wrote a little shell script:
#!/usr/bin/env bash
cp -r /some/directory/file.R .
git add .
git commit -m "add"
git push
...and I run this script in order to push all changes, including the ones in /some/directory.