git还不会用?记住这些就够用了

假如仓库地 https 和 ssh 地址如下

https://gitee.com/wanjim/docker-compose-mac.git
git@gitee.com:wanjim/docker-compose-mac.git


Git 全局设置:

git config --global user.name "小******"
git config --global user.email "27818****"


创建 git 仓库

mkdir docker-compose-mac
cd docker-compose-mac
git init
touch README.md
git add README.md
git commit -m "first commit"
git remote add origin https://gitee.com/wanjim/docker-compose-mac.git
git push -u origin master


已有仓库


cd existing_git_repo
git remote add origin https://gitee.com/wanjim/docker-compose-mac.git
git push -u origin master


 0
 0
 分享
评论图片
评论