Use DropBox as your personal git server

Source: Internet
Author: User

Use DropBox as your personal git server

Rationale: Build a git repository in Dropbox and share folders for multiple people to collaborate. For example, we will build the Demo.git project in the dropbox/project/directory:

First, create a remote repository folder (. git suffix) in the Dropbox folder:

First, enter the DropBox directory

Air:Dropbox admin$ pwd      /Users/admin/Dropbox        Air:Dropbox admin$ mkdir projectAir:Dropbox admin$ cd project/
Second, enter the Demo.git folder and initialize the repository:
Air:project admin$ mkdir demo.gitAir:project admin$ lsdemo.gitAir:project admin$ cd demo.git/

Initialization

Air:demo.git admin$ git init --bareInitialized empty Git repository in /Users/admin/Dropbox/project/demo.git/
After creation, create a copy of the local clone, if you want to create it in the ~/codea/demo/directory:
Air:demo.git admin$ cd ~Air:~ admin$ mkdir codeaAir:~ admin$ cd codea/

Performclone

Air:codea admin$ git clone /Users/admin/Dropbox/project/demo.git/ demoCloning into ‘demo‘...warning: You appear to have cloned an empty repository.done.

To view the execution results:

Air:codea admin$ lsdemo
Iv. testing git
Air:codea admin$ cd demoAir:demo admin$ touch READMEAir:demo admin$ git add README Air:demo admin$ git commit -m "first commit"[master (root-commit) e80b34f] first commit 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 READMEAir:demo admin$ git push origin masterCounting objects: 3, done.Writing objects: 100% (3/3), 210 bytes | 0 bytes/s, done.Total 3 (delta 0), reused 0 (delta 0)To /Users/admin/Dropbox/project/demo.git/ * [new branch]      master -> master

View the Repo folder in DropBox and discover that it has been updated

Air:demo admin$ cd /Users/admin/Dropbox/project/demo.git/Air:demo.git admin$ lsHEAD        config      hooks       objectsbranches    description info        

After all local operations are in ~/codea/ the clone folder, the execution is merged into the local DropBox , and finally DropBox synchronized to the network side.

Share/dropbox/project/demo.git folder, other specified users after synchronizing, local clone git project.

Complete.

Full-text Depth reference "Dropbox makes a private Git server"

Use DropBox as your personal git server

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.