步驟
- 新建一個文件,用Git Bash打開
- 初始化命令:git init
- git add .
- git commit -m "first commit" 引號里的內容是對此次提交的描述
- git remote add origin https://github.com/coldfrontXu/coldfrontXu.github.io.git 此处的地址是你仓库Clone的地址
- git push -f origin master
补充
本地初始化设置(邮箱和名称)
- 命令 git config --global user.name "coldfrontXu" //这里的coldfrontXu是我自己github上的昵称
- 命令 git config --global user.email "xxxxxxxx@qq.com" //这里是你注册的邮箱地址
远程连接我们Github上的仓库(通过SSH Key 公开密钥认证方式)
- 创建公开密钥认证所需要的的SSH Key,并将其添加到GitHub
- 使用git bash 运行命令:ssh-keygen -t rsa -C "XXXXX@qq.com" //此处的邮箱地址还是你自己的邮箱,创建生成SSH Key
打赏一下