git初始化项目常用命令

Git global setup
git config --global user.name "xxx"
git config --global user.email "xxx"
Create a new repository
git clone http:/xxxx/qa/platform-service.git
cd platform-service
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://xxxx/qa/platform-service.git
git add .
git commit -m "Initial commit"
git push -u origin master
Existing Git repository
cd existing_repo
git remote add origin http://xxx/qa/platform-service.git
git push -u origin --all
git push -u origin --tags
posted @ 2024-06-14 14:42  ilovetesting  阅读(7)  评论(0编辑  收藏  举报