Skip to content

Instantly share code, notes, and snippets.

@mazehri
mazehri / terminal-prompt-git-branch-zsh.md
Created June 19, 2023 10:11 — forked from reinvanoyen/terminal-prompt-git-branch-zsh.md
Add Git Branch Name to Terminal Prompt (MacOS Catalina zsh)

Add Git Branch Name to Terminal Prompt (MacOS Catalina zsh)

Updated for MacOS Big Sur | Monterey | Ventura

screenshot

Install

Open ~/.zshrc in your favorite editor and add the following content to the bottom.

function parse_git_branch() {