git config --global user.name 'your_github_username'
git config --global user.email 'your_github_email'
(Run the command below in your terminal to open the config file using VScode)
code ~/.gitconfig
#paste this, if there are more settings there you don't need to remove them, just add the following sections
[alias]
st = status
ci = commit
co = checkout
br = branch
[color]
branch = auto
diff = auto
interactive = auto
status = auto
ui = true
[color "status"]
added = yellow
changed = cyan
untracked = red
code ~/.bash_profile
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit, working directory clean" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/(\1$(parse_git_dirty))/"
}
export PS1='\[\e[1;37m\]\w\[\e[m\] $(parse_git_branch "(%s)" ) \[\e[1;32m\]\$ \[\e[m\]\[\e[1;37m\]'
This command will make your terminal refresh its configs and make the above ^ configs effective, if this for some reason does not work, just open and close your terminal again or do cd .
which should also work as it will be trying to access the same folder that you are located right now and refresh the configs.
source ~/.bash_profile