4 ms·
(1) you can also use the GIT_DIR environment variable, which might save some typing during development (2) another solution is to just clone the bare repositor
by cnvogel 13y ago
(1) you can also use the GIT_DIR environment variable, which might save some typing during development
(2) another solution is to just clone the bare repository in Dropbox to a temp-directory, work there, and push the changes back to the Dropbox'ed repo. Saves you the effort to specify GIT_DIR or --git-dir all the time and is the saner approach if you have to switch back and forth between different repos.
$ GIT_DIR=~/Dropbox/my_repo git init --bare
Initialized empty Git repository in /home/chris/Dropbox/my_repo/
$ git clone ~/Dropbox/my_repo
Initialized empty Git repository in /home/chris/my_repo/.git/
warning: You appear to have cloned an empty repository.
$ cd my_repo ; touch README
$ git add README ; git commit -m "README" ; git push origin master
[master (root-commit) ada37ca] README
0 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 README
Counting objects: 3, done.
Writing objects: 100% (3/3), 213 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
To /home/chris/Dropbox/my_repo
* [new branch] master -> master