微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

'git add -u' 暂存所有 repo 文件

如何解决'git add -u' 暂存所有 repo 文件

出于团队流程的目的,我在 Linux(centOS 7.5.1804,git 版本 1.8.3.1)上有一个本地 GIT 存储库。在我这边,我从 Windows、Sublime Merge 或直接从 gitbash(windows 10,git 版本 2.31.1.windows.1)管理它。 我在 Sublime Merge 上直接打开 linux Repo(通过 Windows 上的网络地图),或者转到 gitbash 上的 linux 目录。 如果我修改了几个文件(例如 3 个),当我在 Sublime Merge 上使用“Stage All”或在 gitbash 上使用“git add -u”时,我会暂存我的所有 repo 文件(在我的情况下为 300)。 Sublime Merge 为每个文件显示附加警告。 .gitattributes 示例:

警告:LF 将被 .gitattributes 中的 CRLF 替换。 该文件将在您的工作目录中以原始行结尾

我已验证文件,所有文件(已修改或未修改)或 Linux 行尾 (LR):已在 Windows 上使用 VSCode、sublime text 和 notepad++ 进行检查。

在 gitbash 上,“git status”将我所有的 300 个 repo 文件列为已修改且未暂存。 我在同一个 Repo 上的 linux 术语没有问题。

我的 git 在 windows 上有什么问题,以及如何能够在我的 linux Repo 上使用 windows 现代 GIT GUI 软件?

谢谢。

信息: Windows 上的“git config --list --show-origin --show-scope”

system  file:C:/Program Files/Git/etc/gitconfig http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
system  file:C:/Program Files/Git/etc/gitconfig http.sslbackend=openssl
system  file:C:/Program Files/Git/etc/gitconfig diff.astextplain.textconv=astextplain
system  file:C:/Program Files/Git/etc/gitconfig credential.helper=manager-core
system  file:C:/Program Files/Git/etc/gitconfig core.fscache=true
system  file:C:/Program Files/Git/etc/gitconfig core.symlinks=false
system  file:C:/Program Files/Git/etc/gitconfig pull.rebase=false
system  file:C:/Program Files/Git/etc/gitconfig credential.https://dev.azure.com.usehttppath=true
system  file:C:/Program Files/Git/etc/gitconfig init.defaultbranch=master
global  file:C:/Users/john/.gitconfig           user.email=john.doe@discret.com
global  file:C:/Users/john/.gitconfig           user.name=john
global  file:C:/Users/john/.gitconfig           diff.tool=p4merge
global  file:C:/Users/john/.gitconfig           difftool.p4merge.path=C:\Users\john\Perforce\p4merge.exe
global  file:C:/Users/john/.gitconfig           merge.tool=p4merge
global  file:C:/Users/john/.gitconfig           mergetool.p4merge.path=C:\Users\john\Perforce\p4merge.exe
global  file:C:/Users/john/.gitconfig           mergetool.keepbackup=false
global  file:C:/Users/john/.gitconfig           core.autocrlf=false
local   file:.git/config                        core.repositoryformatversion=0
local   file:.git/config                        core.filemode=true
local   file:.git/config                        core.bare=false
local   file:.git/config                        core.logallrefupdates=true
local   file:.git/config                        core.autocrlf=false
local   file:.git/config                        remote.origin.url=https://server.com/git/project.git
local   file:.git/config                        remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
local   file:.git/config                        branch.john_branch.remote=origin
local   file:.git/config                        branch.john_branch.merge=refs/heads/john_branch

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?