git - 在 Rebase、Fetch 和 Reset 之后修改 Git 文件
问题描述
我的同事用 master 重新设置了我的分支并做了一些工作并推送到了远程。为了防止冲突,他推后,我做了一个fetch
和reset --hard origin/<my branch>
我继续我的工作,并希望添加、提交和推送我的更改,但一些不属于我的文件被修改了。(我确定我没有碰过那些文件)
当我git status
在我的分支机构做:
$ git status
On branch my-branch
Your branch is up to date with 'origin/my-branch'.
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: 1
modified: 2
modified: 3
modified: 4
deleted: 5
deleted: 6
modified: 7
modified: 8
modified: 9
no changes added to commit (use "git add" and/or "git commit -a")
我只更改了1和2,从3到9是我没有碰过的文件。
我的问题是:
1、为什么我没碰的文件被修改了?
2、如果我只git add
对文件1和2做,会不会对以后有影响?(如对合并、拉动的影响)
解决方案
推荐阅读
- python - Python:用开始和结束分隔符分割一个单词,并将分隔符保留在里面
- php - mysqldump返回空文件
- r - 期望 B2 / R2C2 中的数字:在 R 中获得日期
- javascript - Discord.js 代码无法发送嵌入消息
- docker - Mac下将本地代理传递给docker容器
- tcl - 明显不一致的读/写变量
- list - 如何将列表中的列表添加到另一个列表
- selenium - 右键单击元素导致新页面无法检查元素
- swiftui - iPad 上的 Swift Playgrounds 无法按预期使用 SwiftUI 代码
- database - wordpress bitnami 我的页面折叠数据库