如何查看 Git 的工作日志(不是提交历史,而是 Git 的进程) [英] How to see Git's working log (not commit history, But Git's process)

查看:76
本文介绍了如何查看 Git 的工作日志(不是提交历史,而是 Git 的进程)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 vscode 的 ssh 远程控制中对另一台 Windows 机器进行 Git 工作.其他东西工作没有问题.(例如编辑、编译...)但是当我尝试推/拉/取时,git 没有任何反应.似乎有什么悬而未决.所以我想看看具体的步骤来找出问题所在.

I am trying to do Git work in vscode's ssh remote control to another windows machine. Other stuff jobs are not problems. (like editing, compiling...) But When I tried to push/pull/fetch, git didn't respond anything. It seems like being pending by something. So I want to see specific steps to turn out what is a problem.

注意:记录、显示...命令工作正常.当我直接在机器上工作时,不会出现这个问题.

Note: Log, show... commands are working correctly. When I am working in the machine directly, this problem doesn't occur.

推荐答案

您可以按照调试部分的文档中的定义设置环境变量 这里

You can set environment variables as defined in the documentation in the Debugging section here

GIT_TRACE控制不属于任何特定类别的一般跟踪.这包括别名的扩展,以及对其他子程序的委托.

GIT_TRACE controls general traces, which don’t fit into any specific category. This includes the expansion of aliases, and delegation to other sub-programs.

在终端中,您可以将此变量 GIT_TRACE 设置为 1 并运行您的 git 命令.在 Windows 中你可以做 set GIT_TRACE=1 而在 linux 环境中你可以做 export GIT_TRACE=1

In the terminal you could set this variable GIT_TRACE to 1 and run your git command. In Windows you can do set GIT_TRACE=1 and in linux environment you can do export GIT_TRACE=1

除此之外,如果您想在 git 中看到涉及 curl 的网络相关操作的详细输出,您可以使用设置此环境变量 GIT_CURL_VERBOSE.

In addition to this if you would like to see verbose output of the network related operations in git which involves curl, you can use set this environment variable GIT_CURL_VERBOSE.

网络

Git 使用 curl 库进行网络操作HTTP,所以 GIT_CURL_VERBOSE 告诉 Git 发出所有生成的消息通过那个图书馆.这类似于在命令行上执行 curl -v.

Git uses the curl library to do network operations over HTTP, so GIT_CURL_VERBOSE tells Git to emit all the messages generated by that library. This is similar to doing curl -v on the command line.

这篇关于如何查看 Git 的工作日志(不是提交历史,而是 Git 的进程)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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