@glenn already got the answer, but I've found a simpler way of showing the git prompt on fish.
From the terminal, in fish, type fish_config
. This will open a browser window. Select the second tab prompt
and under there select Classic + Git`.
This will show the commands required to show Git on the terminal prompt. Copy them to your ~/.config/fish/config.fish
or even simpler: click on "Use prompt".
How awesome is that?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…