git 仓库初始化

发布时间 2024-01-09 14:24:43作者: vx_guanchaoguo0

全局设置

git config --global user.name "寂寞的钢蛋儿"
git config --global user.email "guanchaoguo@qq.com"

创建 git 仓库:

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

已经存在的仓库

cd existing_git_repo
git remote add origin https://gitee.com/guanchaoguo/test.git
git push -u origin "master"