是否有可能在报告提交之前查看谁编辑了特定行git blame,例如给定行的提交历史记录?
例如,我运行以下(在极好的uncrustify项目上):
$ git blame -L10,+1 src/options.cpp
^fe25b6d (Ben Gardner 2009-10-17 13:13:55 -0500 10) #include "prototypes.h"
Run Code Online (Sandbox Code Playgroud)
如何在提交之前找出谁编辑了该行fe25b6d?又是谁之前编辑它是承诺?
我有一个远程裸存储库hub.我只在master分公司工作.下面这条错误消息的最后一句让我想知道:我如何找出哪个是"当前分支的默认配置遥控器"?我该怎么设置它?
[myserver]~/progs $ git remote -v
hub ~/sitehub/progs.git/ (fetch)
hub ~/sitehub/progs.git/ (push)
[myserver]~/progs $ git branch -r
hub/master
[myserver]~/progs $ cat .git/HEAD
ref: refs/heads/master
[myserver]~/progs $ git pull hub
You asked to pull from the remote 'hub', but did not specify
a branch. Because this is not the default configured remote
for your current branch, you must specify a branch on the command line.
Run Code Online (Sandbox Code Playgroud) 在Linux中,我最喜欢的合并工具是Meld,我使用或配置它与Git一起工作时没有任何问题.然而,在Windows中它是一个不同的故事.
首先,我从我在这里找到的软件包中安装了Meld:https://code.google.com/p/meld-installer/
然后,我配置了我的.gitconfig,以支持Meld作为默认的mergetool
[merge]
tool = meld
[mergetool "meld"]
path = C:\\Program Files (x86)\\Meld\\meld\\meld.exe
keepBackup = false
trustExitCode = false
Run Code Online (Sandbox Code Playgroud)
所以,当我遇到冲突时,我会做git difftool而Meld确实打开了.但是,Git写入传递给diff工具的文件的路径不正确.例如,即使Git在存储库目录(我称之为git mergetool的位置)中生成BASE,LOCAL和REMOTE文件,Meld也会尝试打开可执行文件目录中的每个文件.
Meld尝试打开C:\ Program Files(x86)\ Meld\meld\roses.txt.LOCAL.2760.txt,而不是打开C:\ repo\roses.txt.LOCAL.2760.txt.
有没有人遇到过这个或知道如何配置Git/Meld在Windows中正常工作?