//配置一下你的身份
git config --global use.name "Douzi"
git config --global use.email "jdouzi@qq.com"

可以用:
git config --global use.name
git config --global use.email
查看是否配置成功

//用cd进入想要提交项目的目录下面, 建立一个代码仓库
git init       //此时会在该项目的根目录下生成一个隐藏的.git文件夹


//添加本地代码, 假如添加build.gradle这个文件
git add build.gradle

//想添加app这整个目录
git add app

//添加该项目下的所有文件夹和文件
git add .

//添加好之后,可以提交一下了, commit命令后,一定要通过 -m 参数来加上提交的描述信息,没有描述信息的提交被认为是不合法的
git commit -m  "first commit."

 

相关文章:

  • 2022-01-07
  • 2021-07-06
  • 2021-04-07
  • 2021-04-27
  • 2021-04-10
  • 2022-02-07
猜你喜欢
  • 2022-01-13
  • 2022-02-07
  • 2021-09-24
  • 2021-10-09
  • 2021-09-04
  • 2022-02-07
相关资源
相似解决方案