Git簡易的命令列入門教程:

董雷發表於2021-12-12

Git簡易的命令列入門教程

假如倉庫地https和ssh地址如下

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

https

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

ssh

建立 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 git@gitee.com:wanjim/docker-compose-mac.git
git push -u origin master

已有倉庫?

cd existing_git_repo
git remote add origin git@gitee.com:wanjim/docker-compose-mac.git
git push -u origin master
本作品採用《CC 協議》,轉載必須註明作者和本文連結
good good study day day up

相關文章