根據(jù)git 的日常使用頻率亏狰,總結(jié)了一下
1、克隆工程
git clone https://github.com/XXXX/test.git
2与柑、本地新建Git工程
本地分支與遠(yuǎn)程分支相連
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/XXXX/test.git
git push -u origin master
3则果、查看遠(yuǎn)程分支
git branch -a
4、查看本地分支
git branch
5凭疮、創(chuàng)建本地分支
git branch v1.1
v1.1是分支名
6、將本地分支推送到遠(yuǎn)程
git push origin v1.1
7串述、切換分支
git checkout v1.1
8.刪除本地分支
git branch -d v1.1
9执解、刪除遠(yuǎn)程分支
git branch -r -d origin/branch-name
git push origin :branch-name
10、查看遠(yuǎn)程git地址
git remote -v