我用git add file添加文件时出现这样错误:

fatal: Not a git repository (or any of the parent directories): .git

提示说没有.git这样一个目录,解决办法如下:

git init就可以了!

二、warning: You appear to have cloned an empty repository

 

三、修改git已经commit的邮箱和用户名

第一步:前往需要修改的版本

1、使用 git log 获取需要修改的版本id

2、使用 git reset –soft [版本号] 前往版本

第二步:修改信息

使用 git commit --amend --author='用户名 <邮箱>'修改
在打开的文件中保存一下就可以了
第三步:提交代码

使用 git push

四、git分支代码报错

git clone master

git checkout 分支

然后就可以了

 

 

相关文章:

  • 2021-12-29
  • 2021-11-11
  • 2021-08-13
  • 2021-08-17
  • 2021-12-10
  • 2021-06-06
  • 2021-06-17
  • 2021-07-07
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-04
  • 2021-04-30
  • 2021-11-07
  • 2021-10-10
  • 2021-12-20
相关资源
相似解决方案