Using dropbox as a git repository
Git on Dropbox
Rather than creating a repository and working copy in the Dropbox directory, this time I wanted to create a Git bare repository in Dropbox. Based on this excellent article, I was able to accomplish this in a matter of minutes. Here are the steps:
- I already had a Git repository in
~/Documents/livemesh/myproject
. Before doing anything, I ensured everything was committed.cd ~/Dropbox
git clone --bare ~/Documents/livemesh/myproject myproject
(this created a bare repository in~/Dropbox/myproject
)cd ~/dev
git clone ~/Dropbox/myproject myproject
(this made my Git working copy in~/dev/myproject
)Now I can do my day-to-day work in
~/dev/myproject
. After committing any new edits, I can typegit push
to send my changes to Dropbox. On the other computer, I can receive changes by typinggit pull
.So far Git has been far easier than I imagined, therefore I am kicking myself for not learning it sooner. Since I’m rambling, I’ll point you to git-osx-installer, which makes Git installation trivial on OSX.
Comments