之前使用 git 一直忘了整理,今天正好无事做记录一下。本篇博客仅仅是为了方便我以后使用 git。
第一次使用 git 命令行推送至远程仓库
- 首先在 github 或者gitee或者gitlab上创建一个仓库。
- 点击 clone 复制一下地址。
- 使用 git 打开代码的根目录,输入命令
git init
git add *
git commit -m"第一次提交"
git remote add origin 复制的地址
git pull --rebase origin master
git push origin master
结束。