Skip to content

Instantly share code, notes, and snippets.

@thgesteves
thgesteves / terminal-prompt-git-branch-zsh.md
Created March 10, 2022 12:25 — 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)

screenshot

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

function parse_git_branch() {
    git branch 2> /dev/null | sed -n -e 's/^\* \(.*\)/[\1]/p'
}
@thgesteves
thgesteves / .gitignore Java
Last active March 14, 2021 12:28 — forked from dedunumax/.gitignore Java
A complete .gitignore file for Java
##########################
## Java
##########################
*.class
.mtj.tmp/
*.jar
*.war
*.ear
hs_err_pid*