git初始化

39 阅读1分钟

Git 全局设置:

git config --global user.name "iceice"
git config --global user.email "11566206+iceicee@user.noreply.gitee.com"

创建 git 仓库:

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

已有仓库?

cd existing_git_repo
git remote add origin https://gitee.com/iceicee/vue3-project-template.git
git push -u origin "master"

git 问题:

  1. clone 出错: image.png 解决: git clone http:///git.idocoding.com/

  2. ssh 设置秘钥命令: ssh -keygen -R git@git.idocoding.com:Lumy/RedBrickRecruitmentEnd.git

image.png 将此公钥粘贴到项目设置秘钥处

image.png