git rebase与rebase同步,显示其他人的文件在本地被修改 [英] git sync with rebase showing other people's files as modified locally

查看:206
本文介绍了git rebase与rebase同步,显示其他人的文件在本地被修改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的团队刚刚搬到使用github作为我们的主要代码存储库,并且正在经历艰辛的工作.我们都对SVN(我们以前的仓库)很熟悉.

Our team just moved to use github as our primary code repository, and are going through teething pains. We're all familiar with SVN (our previous repo).

我们都致力于回购的主服务器,并且启用了rebase选项(我们都在PC上使用Github,顺便说一句).据我了解,启用rebase后,同步与进行"svn up"具有可比性,因为它会将所有更改合并到本地结帐中.仅当实际存在文件合并时,系统才会提示您处理

We're all committing to the repo's master, and have rebase option turned on (we're all using Github for PC, btw). It's my understanding that with rebase turned on, syncing becomes comparable to doing an "svn up" in that it merges in all changes into your local checkout. Only when there's actually a file merge will you be prompted to handle

但是,我们发现我们有两个奇怪之处.

However, we're finding that we're having two oddities.

  1. 其他人已更改的
  2. 文件现在显示在我的已修改文件"列表中,需要重新提交.我没有碰过他们.为什么会发生这种情况并重新设置基准?
  3. 我们所有人都看到无法同步此分支-您可能需要打开外壳程序并调试此存储库的状态"消息.大概发生这种情况的原因是当存在合法冲突时...?

有人能对其中任何一个有所了解吗?谢谢...!

Could anyone shed a little light on either of these? Thanks...!

推荐答案

确保将core.autocrlf设置为false.

Make sure you have core.autocrlf set to false.

cd /path/to/your/repo
git config core.autocrlf false

然后重新标准化您的存储库(确保您没有任何工作正在进行,或者甚至最好在单独的克隆中完成)

Then renormalize your repo (make sure you don't have any work in progress, or, even better, do it in a separate clone)

git rm --cached -r .
git reset --hard

现在检查是否由于"行尾修饰".

Check now if you still have modifications due to "line ending modification".

这篇关于git rebase与rebase同步,显示其他人的文件在本地被修改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆