github的使用
一.branch的創(chuàng)建與合并
https://guides.github.com/activities/hello-world/
二.代碼提交
- 克隆項(xiàng)目到本地
https://github.com/CKTim/BlueTooth.git替換成你之前復(fù)制的地址
#git clone https://github.com/CKTim/BlueTooth.git
- 這個步驟以后你的本地項(xiàng)目文件夾下面就會多出個文件夾疑俭,該文件夾名即為你github上面的項(xiàng)目名谐宙,如圖我多出了個Test文件夾肩杈,我們把本地項(xiàng)目文件夾下的所有文件(除了新多出的那個文件夾不用),其余都復(fù)制到那個新多出的文件夾下
- 進(jìn)入項(xiàng)目目錄
# cd Test
- 別忘記后面的.痕慢,此操作是把Test文件夾下面的文件都添加進(jìn)來
# git add .
- “提交信息”里面換成你需要,如“first commit”
git commit -m "提交信息"
- 把本地倉庫push到github上面,此步驟需要你輸入帳號和密碼
git push -u origin master
三.內(nèi)容修改后的操作
$ 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.
......省略一堆內(nèi)容
$ 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%)
......省略一堆內(nèi)容
$ 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.