Using git with dropbox

1) init the “remote” repository:

cd ~/Dropbox/code && mkdir new_project && cd new_project && git init --bare

replace code and new_project with whatever you like.

2) if you didn’t initialized your local repository, run the following on your local project directory (optional):

git init
git add .
git commit -am "Initial commit"

3) then add the remote repo to your local project:

git remote add origin ~/Dropbox/code/new_project

replace origin with any repository name you like

4) push/pull changes like working with a “normal” git repository:

git push origin master
git pull origin master

Happy coding!

One thought on “Using git with dropbox

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>