- .idea文件夹应该忽略的git版本控制。
新从git上clone代码,可以跑的通。但是发现会有一些.idea文件被修改,这些文件是不应该也不用push到git上的。做以下操作,可以让他脱离git控制。
git rm -r --cached .idea
然后在.gitignore文件中添加.idea

git commit -m 'update .gitignore'
git push
完成效果:

- $ git push
zhangjingfang@gerrit.jeejio.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
解决方案:
因移动.ssh导致。
将对应的.ssh放到C:\Users\Jeejio.ssh\id_rsa.pub
并且在sourceTree的“工具”中“添加ssh密钥”根据上面路径把对应“id_rsa.pub”文件添加进去。
网友评论