- 我正在尝试做的事情:
我和两个朋友一起做一个大学项目,他们对代码做了一些修改。我还对代码进行了很多更改,其中大部分是我想保留的。
我是 git 新手,不知道从哪里开始。我的朋友建议我使用:
git pull origin
当我这样做时,我得到:
error: Your local changes to the following files would be overwritten by merge:
Please, commit your changes or stash them before you can merge
我在 stackoverflow 的某个地方读到:你如何 git fetch 然后合并?“错误:您对以下文件的本地更改将被合并覆盖”
如果我不提交对本地存储库的更改,它们会丢失吗?
- 你如何在本地提交?
- 我如何合并更改(有没有一种我可以使用的方法无法比较)?
- 如何上传更改?
谢谢
这就是它现在的样子:
Arthur Wulf@SUPERWOLF-PC /c/Current Project/study-wise (master|MERGING)
$ git pull origin master
M .pydevproject
U src/app.yaml
M src/getters/__init__.pyc
M src/index.yaml
M src/model/ClassM.pyc
M src/model/CourseM.py
M src/model/CourseM.pyc
M src/model/GeneralM.pyc
M src/model/LectureM.py
M src/model/LectureM.pyc
M src/model/PostClassM.py
A src/model/PostClassM.pyc
M src/model/QuestionM.py
M src/model/QuestionM.pyc
M src/model/StudentM.py
M src/model/StudentM.pyc
M src/model/TopicM.py
M src/model/TopicM.pyc
M src/model/__init__.pyc
M src/setters/__init__.pyc
A src/setters/setQuestionStats.py
D src/setters/setRemoveOldData.py
A src/setters/setStartNewClass.py
A src/setters/setStudentAnswer.py
D src/setters/setTopicChanged.py
A src/setters/setUpdateTopicStats.py
M src/view/allCourses.html
M src/view/lecture.html
U src/view/prof.html
M src/view/question.html
Pull is not possible because you have unmerged files.
Please, fix them up in the work tree, and then use 'git add/rm <file>'
as appropriate to mark resolution, or use 'git commit -a'.
我不明白的是,我如何将本地文件与在线原始存储库端的文件进行比较并合并它们?