Use Dropbox, OneDrive, or any other sync tool as storage for your git repros

Discussion in 'Tutorials and Guides' started by wlanboy, Sep 4, 2016.

  1. wlanboy

    wlanboy Content Contributer

    2,126
    1,169
    May 16, 2013
    You do not need to run a git server to share a git repository between different stations.
    I like to separate strage & sync from the version control. You might see the advantage if you migrate from svn to git.


    You only need 4 steps to create a Dropbox or OneDrive [insert your storage provider here] synced git repro:

    1. Create git repro

      git init --bare ~/OneDrive/gits/wlanrepo.git


    2. Add git to your project (the project should not be on your Dropbox/Onedrive)
      Code:
      cd ~/projects/sites/wlanboy
      git init
      git add --all
      git commit -m “Initial commit of project wlanboy"

    3. Add the git repro as remote
      Code:
      git remote add origin ~/OneDrive/gits/wlanrepo.git

    4. Push everything to your remote repro
      Code:
      cd ~/projects/sites/wlanboy
      git push --set-upstream origin master


    Done.


    Try a "git log" and you will see that everything git-like is working.
     
  2. Jalis Mahamud Tarif

    Jalis Mahamud Tarif New Member

    1
    0
    Oct 13, 2016
    I've gotton new concept to migrate from svn to git.