GIT学习笔记一git init
来源:互联网 发布:生态监测网络 编辑:程序博客网 时间:2024/05/16 17:13
建立裸仓库
--shared[=(false|true|umask|group|all|world|everybody|0xxx)]share 指定为true 时:可以通过配置“core.sharedRepository”来改变$GIT_DIR中目录和文件的访问权限默认的share权限根据umask生成
操作实例:
King@ROYAL /d/gitworkspace/rep$ mkdir test.gitKing@ROYAL /d/gitworkspace/rep$ cd test.gitKing@ROYAL /d/gitworkspace/rep/test.git$ git --bare init --sharedInitialized empty shared Git repository in d:/gitworkspace/rep/test.git/King@ROYAL /d/gitworkspace/rep/test.git (BARE:master)$ lsHEAD branches/ config description hooks/ info/ objects/ refs/King@ROYAL /d/gitworkspace/rep/test.git (BARE:master)$ cd ..King@ROYAL /d/gitworkspace/rep$ lstest.git/
这样我们就建立了一个裸仓库,可以作为远程仓库。
这样项目成员就可以克隆这个仓库,开始项目开发。这可是从零开始。。。
一般情况下项目都不是从零开始,管理员可以将项目已有成功提交到远程仓库,给项目成员克隆。
cd ../worktree
git clone ../rep/test.git
echo "this is h file">test.h
<pre id="best-content-1095419186" class="best-text mb-10" name="code" style="white-space: pre-wrap; word-wrap: break-word; margin-top: 0px; margin-bottom: 10px; padding: 0px; font-family: arial, 'courier new', courier, 宋体, monospace; background-color: rgb(241, 254, 221);">echo "this is c file">test.cgit add .
git commit -m "init"
git push origin master:TEST_main_branch
这样我们就完成了项目的初始化动作,主分支为TEST_main_branch。
</pre><pre id="best-content-1095419186" class="best-text mb-10" name="code" style="white-space: pre-wrap; word-wrap: break-word; margin-top: 0px; margin-bottom: 10px; padding: 0px; font-family: arial, 'courier new', courier, 宋体, monospace; line-height: 24px; background-color: rgb(241, 254, 221);">git init
使用这个命令创建的仓库不是裸仓库,而是在当前目录下生成.git目录,该目录为仓库;而当前目录为工作空间。
http://blog.csdn.net/laurawan/article/details/38611255
0 0
- GIT学习笔记一git init
- GIT学习笔记一git init
- GIT学习笔记一git init
- git 学习笔记(一)
- Git学习笔记(一)
- Git学习笔记一
- Git学习笔记(一)
- Git学习笔记(一)
- git 学习笔记 一
- Git学习笔记一
- Git 学习笔记 一
- Git学习笔记 (一)
- Git学习笔记一
- Git 学习笔记一
- Git学习笔记(一)
- git 学习笔记一
- Git 学习笔记(一)
- Git学习笔记(一) 本地Git
- Flex 布局教程:语法篇
- 【Gnuradio结合hackrf 通过FSK调制实现文本文件的发送与接收】
- 使用 IndexedDB
- [Phonegap+Sencha Touch] 移动开发60 百度云推送,带特殊符号!&+*'的内容,导致安卓收不到推送
- Java接口发送与接收
- GIT学习笔记一git init
- libcurl提交表单上传文件
- Swift UILabel常用功能
- 项目____DUPLICATE、int/varchar、根据多字段排序、根据查询结果反查
- 分组第一天
- 内核协议栈tcp层的内存管理
- matlab演绎笛卡尔的浪漫
- 基于s5pv210的lcd色度键功能的个人探索总结
- 高并发量网站解决方案