Last active
January 15, 2023 07:35
-
-
Save Max95Cohen/7af5c9db2c003cb0c032265c77a14907 to your computer and use it in GitHub Desktop.
git.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git_branch=$(git branch --show-current 2>&1) | |
if [[ $git_branch == *"fatal:"* ]] | |
then export git_branch='' | |
else export git_branch="$git_branch" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment