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