Tag Archives: dropbox

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!