标签: git-for-windows

通过cmd更新git?

我最近将我的 Git 扩展更新为 3.0.2.5232,现在我的 git 不再受支持。当我运行时:

git --version 
Run Code Online (Sandbox Code Playgroud)

我得到

 git version 2.9.0.windows.1
Run Code Online (Sandbox Code Playgroud)

但是,我不能只在线下载最新版本的 git,因为由于管理员权限而我无法运行 .exe 安装程序,还有什么不是,那么有没有我可以运行的命令直接从 admin cmd 升级?

git git-extensions git-for-windows

15
推荐指数
3
解决办法
1万
查看次数

git:致命:检测到可疑的所有权

我使用新的 Windows 安装和网络共享(NAS 系统)上的同一文件夹。安装 git 和 tortoisegit 后,我​​尝试连接到 git 存储库,但总是收到此错误。改变的是服务器而不是用户。

在此输入图像描述

我跑了

git config --global --add safe.directory '*'
Run Code Online (Sandbox Code Playgroud)

但这并没有改变什么。我怎样才能解决这个问题?

在哪里可以设置变量

GIT_TEST_DEBUG_UNSAFE_DIRECTORIES=true
Run Code Online (Sandbox Code Playgroud)

git-for-windows

14
推荐指数
2
解决办法
4万
查看次数

Windows上的git责备报告"致命:HEAD中没有这样的路径<path>"

当我对文件夹e,g中的文件运行git blame时:

git blame Foo/FileA.txt

它返回

fatal: no such path 'Foo/FileA.txt' in HEAD

我可以清楚地看到该文件存在于文件系统中,并且同一文件夹中的其他文件可以成功归咎于 - 所以发生了什么?

我正在发布这个问题和答案,因为它让我今天难倒了一段时间,而且我找不到能够解决所有解决方案的单一答案.

git git-blame git-for-windows

12
推荐指数
1
解决办法
5641
查看次数

为什么使用 SSH 密钥签名提交失败并显示“格式无效”?和“无法写入提交对象”?

我按照GitHub 的说明告诉 git 我的 SSH 密钥,但是当我尝试签署提交时

git commit -S
Run Code Online (Sandbox Code Playgroud)

我收到这个错误:

error: Load key 
"C:\\Users\\MyName\\AppData\\Local\\Temp/.git_signing_key_tmpC5KwFc": invalid format?

fatal: failed to write commit object
Run Code Online (Sandbox Code Playgroud)

我可能做错了什么?

git signing ssh-keys git-for-windows

12
推荐指数
1
解决办法
8638
查看次数

在Git for windows"git bash"中,如何以Windows路径格式"打印工作目录",可以使用cmd和Windows资源管理器吗?

在Windows上使用Git for Windows"git bash"时,如何方便地在Windows路径表示中打印工作目录,例如

D:\foo\bar
Run Code Online (Sandbox Code Playgroud)

类似于使用'pwd'获取Unix表示

/d/foo/bar/
Run Code Online (Sandbox Code Playgroud)

这样路径可以被Windows资源管理器和cmd控制台读取?

windows git bash git-for-windows

11
推荐指数
1
解决办法
1万
查看次数

stithed文件在`git status`中显示为未更改(git v.2.16.0)

我使用git换窗户v2.16.0和遇到以下问题,ALSE报道在这里:

我最初的工作状态很干净; 输出'git status':

git status
On branch beta
nothing to commit, working tree clean
Run Code Online (Sandbox Code Playgroud)

然后我进行局部更改.产量git status:

git status
On branch beta
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   app/src/main/java/android_serialport_api/sample/Debug.java

no changes added to commit (use "git add" and/or "git commit -a")
Run Code Online (Sandbox Code Playgroud)

然后我用'git stash'藏匿它们:

git stash
Saved working directory and index state WIP on beta: 2fca403 …
Run Code Online (Sandbox Code Playgroud)

git git-for-windows

11
推荐指数
1
解决办法
148
查看次数

2020 年如何在 Windows 版 Git 中永久使用“LF”行结尾?

我们的存储库使用LF,我的 Windows 版 Git 安装按原样使用 Checkout,提交 Unix 风格的行结尾

在此输入图像描述

但我在 IDE 中签出的每个文件中仍然会遇到错误,因为它仍然会CRLF一直接收,即使它确实支持并配置为通过签入文件(或在其自己的设置中)LF使用。:LF.editorconfig

.editorconfig
root = true

[*]
end_of_line = lf
Run Code Online (Sandbox Code Playgroud)

现在已经是 2020 年了,IDE 和工具已经支持LFWindows,那么我怎样才能拥有这些好东西呢?

git line-endings editorconfig git-for-windows

11
推荐指数
1
解决办法
1万
查看次数

Git 突然不会自动向 GitHub 进行身份验证

我想推送到 GitHub 上的远程存储库。我git pull origin main一模一样地输入了一百遍,但我得到了错误:

fatal: Unable to persist credentials with the 'wincredman' credential store.
Run Code Online (Sandbox Code Playgroud)

我已经尝试了我能找到的一切。我取消设置凭据管理器,删除 Windows 凭据管理器中的旧凭据,尝试创建 PAT。我终于成功地使用 PAT 拉/推,但现在我必须每次都手动输入我的用户名和 PAT。

我不知道发生了什么,但我希望能够从远程推送/拉取,而无需登录。

git git-for-windows

11
推荐指数
2
解决办法
2万
查看次数

Git Bash 错误:fsmonitor_ipc__send_query

我只是想问一下这个错误的含义是什么?

error: fsmonitor_ipc__send_query: unspecified error on '.git/fsmonitor--daemon.ipc'
Run Code Online (Sandbox Code Playgroud)

我试图找到与此情况类似的内容,但由于某种原因,我看到的只是另一个非常相似的行错误,但没有解释原因。我在使用 Git Bash 时遇到了这个问题。我正在尝试使用 Bash 终端,因为我希望在使用 VS Code 时分隔不同的窗口。希望这能为其他人提供参考。

git git-bash git-for-windows

10
推荐指数
2
解决办法
3364
查看次数

当前打开的文件夹没有git存储库

我正在使用一台装有 Windows 操作系统的工作 PC,并且习惯于使用 ubuntu 操作系统进行 Rails 开发。我在 VSCode 上使用 wsl 作为 ubuntu 正确安装了所有内容,在 Windows 上使用 git 正确安装了所有内容,但问题是源代码控制面板没有检测到任何内容,它只是显示以下内容:

VS Code 中源代码控制面板的屏幕截图

我该如何解决这个问题?

这是我的安装参考。

  • 视觉工作室代码 https://code.visualstudio.com/
  • 世界SLhttps://learn.microsoft.com/en-us/windows/wsl/install
  • githttps://git-scm.com/download/win

git visual-studio-code git-for-windows

10
推荐指数
2
解决办法
2万
查看次数