Dropbox as a git repository



    I want to share a good way to store the main repository.

    This is done by creating a bare — repository in the Dropbox’s folder: We clone the project from your repository tied to the Dropbox account: Now you can perform any Git operations that will be synchronized with all working machines. All the same can be done with any gui client for Git.

    ~/Project $ git init
    ~/Project $ git add .
    ~/Project $ git commit -m "first commit"
    ~/Project $ cd ~/Dropbox

    ~/Dropbox $ mkdir Repos/YourProject.git
    ~/Dropbox $ cd Repos/YourProject.git
    ~/Dropbox $ git init --bare
    ~/Dropbox $ cd ~/Project

    ~/Project $ git remote add origin ~/Dropbox/Repos/YourProject.git
    ~/Project $ git push origin master



    clone ~/Dropbox/Repos/YourProject.git




    GUI


    Here's what the process will look like for TortoiseGit:

    In the Dropbox folder where you plan to store the main repository, right-click and select "Git Create repository here ...".



    In the window that appears, check “Make it Bare” and create a bare repository.



    The following files and folders should appear.



    You can clone the repository as follows:

    Go to the folder where the project will be stored, right-click and select "Git Clone ...".



    A window should appear where you need to specify the Dropbox repository, click OK.


    Also popular now: