我最近将我的 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 升级?
我使用新的 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) 当我对文件夹e,g中的文件运行git blame时:
git blame Foo/FileA.txt
它返回
fatal: no such path 'Foo/FileA.txt' in HEAD
我可以清楚地看到该文件存在于文件系统中,并且同一文件夹中的其他文件可以成功归咎于 - 所以发生了什么?
我正在发布这个问题和答案,因为它让我今天难倒了一段时间,而且我找不到能够解决所有解决方案的单一答案.
我按照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)
我可能做错了什么?
在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控制台读取?
我使用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) 我们的存储库使用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 和工具已经支持
LF
Windows,那么我怎样才能拥有这些好东西呢?
我想推送到 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。
我不知道发生了什么,但我希望能够从远程推送/拉取,而无需登录。
我只是想问一下这个错误的含义是什么?
error: fsmonitor_ipc__send_query: unspecified error on '.git/fsmonitor--daemon.ipc'
Run Code Online (Sandbox Code Playgroud)
我试图找到与此情况类似的内容,但由于某种原因,我看到的只是另一个非常相似的行错误,但没有解释原因。我在使用 Git Bash 时遇到了这个问题。我正在尝试使用 Bash 终端,因为我希望在使用 VS Code 时分隔不同的窗口。希望这能为其他人提供参考。
我正在使用一台装有 Windows 操作系统的工作 PC,并且习惯于使用 ubuntu 操作系统进行 Rails 开发。我在 VSCode 上使用 wsl 作为 ubuntu 正确安装了所有内容,在 Windows 上使用 git 正确安装了所有内容,但问题是源代码控制面板没有检测到任何内容,它只是显示以下内容:
。
我该如何解决这个问题?
这是我的安装参考。
https://code.visualstudio.com/
https://learn.microsoft.com/en-us/windows/wsl/install
https://git-scm.com/download/win
git-for-windows ×10
git ×9
bash ×1
editorconfig ×1
git-bash ×1
git-blame ×1
line-endings ×1
signing ×1
ssh-keys ×1
windows ×1