当我从PowerShell脚本中调用git时,当运行更复杂的命令时,我开始遇到问题:
# Work fine
git log
# Gives error
git log `git describe --tags --abbrev=0 HEAD^`..HEAD --oneline --count
错误:
fatal: ambiguous argument 'git': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
有没有一种好的方法在从PowerShell调用这些长命令时进行封装?
git describe --tags --abbrev=0 HEAD^
单独运行是有效的吗? - Don Cruickshank