Macports 已将旧端口号更新git-core为git. 当更新您的端口 ( port upgrade outdated) 时,这会自动发生。
但是:如果您在 .profile 中使用了旧git-prompt.sh文件,您现在将收到消息-bash: __git_ps1: command not found.
这是因为文件的路径已更改。您应该将 .profile 更新为如下所示:
if [ -f /opt/local/share/git/contrib/completion/git-prompt.sh ]; then
. /opt/local/share/git/contrib/completion/git-prompt.sh
fi
Run Code Online (Sandbox Code Playgroud)