代码上传到Git初始化

762 阅读1分钟

Git 全局设置:

git config --global user.name "xxxx"
git config --global user.email "xxxx@qq.com"

创建 git 仓库:

mkdir myBlog
cd myBlog
git init
git add .
git commit -m "first commit"
git remote add origin https://gitee.com/xxxxxx.git
git push -u origin master

已有仓库?

cd myBlog
git add .
git commit -m "first commit"
git remote add origin https://gitee.com/xxxxxxx.git
git push -u origin master