一.错误描述 To github.com:compassblog/PythonExercise.git ! [rejected] master -> master (fetch first) error: failed to push some refs to 'git@github.com:compassblog/PythonExercise.git' hint: Updates were rejected because the remote contains work that you d…
不小心的操作,删除了某些文件 某天很高大地用上了git来管理版本,分布式版本管理工具,好是好,但是还不是很熟悉,结果某天一不小心就从本地仓库中删除了若干个文件,该如何找回这些文件呢? 调查现场 git status 通过该命令来查看当下的仓库状况. # On branch master # Changes not staged for commit: # (use "git add <file>..." to update what will be committed) #…
$ git push -u origin master To git@github.com:xxx/xxx.git ! [rejected] master -> master (fetch first) error: failed to push some refs to 'git@github.com:xxx/xxx.git' hint: Updates were rejected because the remote contains work that you do hint: not h…
Git开发中,由于项目开发人员不只一个,所以在代码开发中,多个开发人员可能会对同一文件同一地方的代码进行修改,这样在先后提交到master上时,就会产生冲突,以下是演示冲突产生和解决冲突的示例: 1.在IDEA新建一个README.md文件进行演示 内容为: test conflict 111. commit and push到master上 2.在GIT HUB上直接修改此文件内容 test conflict 222.(这是模拟其他开发人员先提交代码到master上) 3.在IDEA中修改内容…