1. 安装GitHubSetup.exe for windows
2. 安装Dropbox 1.6.17.exe for windows
3. D:\ 根目录下有自己的source目录
-D:\MySourceCode
-README.txt
-stdafx.cpp
-include
-stdafx.h
3. 打开GitShell, 安装完GitHub windows客户端会生成该快捷方式
4. gitshell 命令行界面
命令行默认路径为GitHub GUI客户端中设置的默认"default storage directory", 如下图
5.
cd ..
cd .\MySourceCode
命令行结果,多出.git文件夹
6. 提交原有的code等文件到git 本地Repo
git add .
git commit -m "commit orignal source code."

7. 生成一个不带source code的Git仓库
cd ..
git clone --bare MySourceCode MySourceCodet.git
7. 生成一个不带source code的Git仓库
cd ..
git clone --bare MySourceCode MySourceCodet.git


8. 把MySourceCodet.git移动到Dropbox同步目录D:\Dropbox(一开始直接把MySourceCodet.git创建在同步目录也可以)
至此,dropbox的作为私有的git服务器功能已经完成
下面做实验
1. E盘下创建test1目录
2. gitshell
cd E:\test1
git clone file:///D:\Dropbox\MySourceCodet.git
E:\test1目录下clone了MySourceCode的代码
3. 通过notepad编辑E:\test1\MysourceCodet下的代码
4. GitShell
cd .\MySourceCodet
git pull //把远端Repo上的文件拉下来
git status //查看mofify状态
git add . //把所有文件添加进需要commit的列表
git commit -m "msg: commit updated files"
此时已经把user的修改提交到本地的Repo
5. 把本地repo的改动push到远端Repo
6. 在E:盘下创建E:\test2
7. gitshell
cd ..
cd ..
cd test2
git clone file:///D:\Dropbox\MySourceCodet.git
8. 进入test2查看,是test1最新commit到远端服务器的代码
cd MySourceCode
git log
遗留问题:
参考文献