全局设置用户信息 Git global setup
git config --global user.name "xxx" git config --global user.email "[email protected]"
创建新仓储 Create a new repository
git clone http://xxx/xxx.git cd test touch README.md git add README.md git commit -m "add README" git push -u origin master
Push an existing folder
cd existing_folder git init git remote add origin http://xxx/xxx.git git add . git commit -m "Initial commit" git push -u origin master
Push an existing Git repository
cd existing_repo git remote rename origin old-origin git remote add origin http://xxx/xxx.git git push -u origin --all git push -u origin --tags
查看本地仓储和远程仓储关联:
git remote -v
添加远程仓库地址
git remote add origin https://gitee.com/xxx.git
标签:origin,git,remote,xxx,existing,add,GIT,常用命令,常见问题 From: https://www.cnblogs.com/chocolatexll/p/16941234.html