git config —list
git config —global user.name “乐惠苑”
git config —global user.email “lehuiyuan@outlook.com”
————————-
cd ~/.ssh 或者 C:\Users*username*.ssh
ssh-keygen -t rsa -C “lehuiyuan@outlook.com”
ssh -T git@gitee.com
———————
创建 git 仓库:
mkdir leHuiYuan
cd leHuiYuan
git init
$ git config user.name “gitlab’s Name”
$ git config user.email “gitlab@xx.com”
touch README.md
git add README.md
git commit -m “first commit”
git remote add origin git@gitee.com:leHuiYuan/leHuiYuan.git
git push -u origin master
已有仓库?
cd existing_git_repo
git remote add origin git@gitee.com:leHuiYuan/leHuiYuan.git
git push -u origin master
git push -u origin master -f
———————————-
git pull origin master
git remote -v
git status 或 git status -s
git log
git remote rm origin //把orgin这个仓库代名词移除
其他
———————
目录:~/.ssh 等于 C:\Users*username*.ssh
配置:.ssh/config
# gitee
Host gitee.com
HostName gitee.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/wiz