For your alias to be insert in commands bash, you need to include that in .bashrc, so take this example and to be happy:
echo alias g=\'git\' >> .bashrc
If you have a success with this command, you can now call git with 'g' command.
Now, if you like alias git, you can create your personal alias file, take this example and edit your file ~ / .gitconfig:
[user]
email = [email protected]
name = Mikael Hadler
[core]
editor = vim
[alias]
st = status
ac = !git add . && git commit
ck = checkout
cb = checkout -b
cm = commit
p = push origin
pl = pull origin
b = branch
f = fetch origin
revert = reset --hard HEAD~1
dd = diff
del = branch -D
l = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit