git遇到的问题

执行 git push origin master 操作会报该错误:

Permission denied (publickey).

fatal: Could not read from remote repository.

问题:我已经在github上传了SSH公钥,但是却没有在本地添加SSH

解决方法:在本地添加我生成的SSH文件

比如我现在已经在当前文件夹找到了SSH文件

执行:ssh-add 13705038428SSH

就可以了

=====================================

问题:

hint: Updates were rejected because the tip of your current branch is behind

hint: its remote counterpart. Integrate the remote changes (e.g.

hint: 'git pull ...') before pushing again.

hint: See the 'Note about fast-forwards' in 'git push --help' for details.

当前路径并非git路径真尴尬,网上一片解说,贼菜

=====================================

问题 : Permission denied (publickey).

            fatal: Could not read from remote repository.

git目录下的SSH和公钥不能删,删了就会出现这个错误

解决:重新生成SSH,上传到github,本地再次添加SSH就好了


=pppppppppp

项目整个文件夹直接拖进git项目里,git不会提示新文件状态,需要先创建一个文件夹然后把项目文件夹里的全拷贝进去,就有提示了

=pppppppppp

关于忽略文件

pod只留下podfile,其他忽略,其他成员下载项目后,pod update就行了

*~

.DS_Store

*.xcuserstate

*.xcworkspace

xcuserdata

*.lock

Pods



曹老师8428

你可能感兴趣的:(git遇到的问题)