git使用小结

1、github已有账户,创建一个新的仓库

github网址:https://github.com/

2、本地安装git

我用的是软件商店下载的,下图第一个,默认安装即可。

3、新建空文件夹,右键选择git Bash here(git安装完以后,右键自动就有了),进入命令行模式

4、git使用命令

1>初次使用

  • git init
  • git config --global user.name "你自己github的用户名"
  • git config --global user.email "你自己的邮箱"
  • echo '#test' >> README.md
  • git add .
  • git commit -m "备注内容"
  • git remote add origin url(远程仓库的url)
  • git push -u origin master

2>平时使用

3>其他操作

原文地址:https://www.cnblogs.com/Mrq-t/p/12963936.html