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: