1. 程式人生 > >git基本使用方法

git基本使用方法

scp git push open pull 工程 第一步 HA 代碼 part

1、下載:
1).單擊:clone with commit-msg hook
2).單擊:ssh
3).復制URL:git clone ssh://[email protected]:29418/vmax/vmax-r/vmax-r-thirdparty-sswk && scp -p -P 29418 [email protected]:hooks/commit-msg vmax-r-thirdparty-sswk/.git/hooks/
開始下載
{ 第一步:瀏覽器進入http://gerrit.zte.com.cn/#/admin/projects/
第二步:filter篩選sswk工程
第三步:選擇表頭的‘ssh‘、‘clone with commit-msg hook‘ 然後復制
第四步:將復制的內容git clone ssh://[email protected]:29418/vmax/vmax-r/vmax-r-thirdparty-sswk && scp -p -P 29418 [email protected]:hooks/commit-msg vmax-r-thirdparty-sswk/.git/hooks/
第五步:打開git bash ,將第四步的內容復制在命令行 ,開始下載
}
2、提交;
1).git add ./ -----第一步添加到待提交的模板
2).git commit -m "sswk工程合入最新代碼" ----第二步寫日誌
3).git push origin HEAD:refs/for/master -----第三步提交到服務器
4).open "http://gerrit.zte.com.cn/#/dashboard/self"->My->Changes(選擇審批人) ---第四步選擇審批人,審批通過才能合入版本
3、git常用命令
git pull 更新當前目錄
git branch -a 查看分支情況
git branch 查看當前所在的分支
git checkout remotes/origin/branch/V6.17.10.40.01B3 切換分支,切換到B3分支上
git提交;
1).git add ./ -----第一步添加到待提交的模板
2).git commit -m "sswk工程合入最新代碼" ----第二步寫日誌
3).git push origin HEAD:refs/for/master -----第三步提交到服務器
4).open "http://gerrit.zte.com.cn/#/dashboard/self"->My->Changes(選擇審批人) ---第四步選擇審批人,審批通過才能合入版本

git基本使用方法