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