2016年05月27日 13:00:56 wwwwxhh 阅读数 5946git
Git裸仓库建立 使用命令行:git init –bare 使用TortoiseGit:右键菜单git creat repo here,选择Make it Bare服务器
裸仓库能够直接做为服务器仓库供各开发者push、pull数据,实现数据共享和同步,不保存文件,只保存历史提交的版本信息spa
非裸仓库建立:git init使用TortoiseGit:右键菜单git creat repo here,不选择Make it Bare.net
向非裸仓库push文件会报错,须要在.git 文件夹的config文件后加一句命令行
[receive]开发
denyCurrentBranch = ignoreget
才能提交数据,非裸仓库使用git reset --hard命令能够看到提交文件同步