这样做:
git config --global alias.hist 'log --pretty=format:"%h %ad | %s%d [%an]" --graph --date=short'
as mentioned在 Windows 机器上给我 这个错误:
usage: git config [options]
当我尝试运行 git hist
时。有什么建议为什么它不起作用吗?
最佳答案
我无法获取添加 hist
的命令git
的别名.但是我直接把它插入.gitconfig
通常可以位于 "C:\Users\<login name>\"
的文件或 "C:\Documents and Settings\<login name>\"
.
看我的片段.gitconfig
文件,并记下要对 hist
所做的更改别名,以便它在 Windows 下工作正常。
[alias]
co = checkout
ci = commit
st = status
br = branch
hist = !git --no-pager log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
type = cat-file -t
dump = cat-file -p
关于windows - 在 Windows 上通过别名将 git hist 设置为 pretty-print 日志,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23525959/