git 常用操作

Git global setup
git config --global user.name "xxx"
git config --global user.email "xxx@xxx.cn"
Create a new repository
git clone http://chengmengbao@172.16.34.88/LoRa-IoT/chengmengbao_testgit.git
cd chengmengbao_testgit
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master
Existing folder
cd existing_folder
git init
git remote add origin http://chengmengbao@172.16.34.88/LoRa-IoT/chengmengbao_testgit.git
git add .
git commit
//!!!!!!!!!!!!!!!!!!!!!!!!
//先git pull 更新后再push
git pull origin master
//!!!!!!!!!!!!!!!!!! git push
-u origin master
Existing Git repository
cd existing_repo
git remote add origin http://chengmengbao@172.16.34.88/LoRa-IoT/chengmengbao_testgit.git
git push -u origin --all
git push -u origin --tags

 

posted @ 2019-03-08 15:46  大西瓜Paul  阅读(176)  评论(0编辑  收藏  举报
/*增加返回顶部按钮*/ 返回顶部 /*给标题增加蓝色背景长条*/