github的使用
一.branch的创建与合并
https://guides.github.com/activities/hello-world/
二.代码提交
- 克隆项目到本地
https://github.com/CKTim/BlueTooth.git替换成你之前复制的地址
#git clone https://github.com/CKTim/BlueTooth.git
- 这个步骤以后你的本地项目文件夹下面就会多出个文件夹,该文件夹名即为你github上面的项目名,如图我多出了个Test文件夹,我们把本地项目文件夹下的所有文件(除了新多出的那个文件夹不用),其余都复制到那个新多出的文件夹下
- 进入项目目录
# cd Test
- 别忘记后面的.,此操作是把Test文件夹下面的文件都添加进来
# git add .
- “提交信息”里面换成你需要,如“first commit”
git commit -m "提交信息"
- 把本地仓库push到github上面,此步骤需要你输入帐号和密码
git push -u origin master
三.内容修改后的操作
$ git add .
warning: LF will be replaced by CRLF in controller/admin-openrc.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in controller/all_floating_ip_id.txt.
......省略一堆内容
$ git commit -m 'controller'
[master 8c8edb3] controller
54 files changed, 0 insertions(+), 0 deletions(-)
rename README.md => controller/README.md (100%)
rename admin-openrc => controller/admin-openrc (100%)
rename all_floating_ip_id.txt => controller/all_floating_ip_id.txt (100%)
rename all_network_id.txt => controller/all_network_id.txt (100%)
rename all_router_id.txt => controller/all_router_id.txt (100%)
rename all_server_id.txt => controller/all_server_id.txt (100%)
......省略一堆内容
$ git push -u origin master
Counting objects: 2, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (1/1), done.
Writing objects: 100% (2/2), 240 bytes | 0 bytes/s, done.
Total 2 (delta 0), reused 0 (delta 0)
To https://github.com/tom523/openstack_install.git
ce53904..8c8edb3 master -> master
Branch master set up to track remote branch master from origin.