Now i use ubntu 17.10.
How to change git command for example
git add .command likega,git commitcommand likegcgit pushcommans lije `gp
other example like $ git add command like $ ga
when i typing ga then it work like git add
Now i use ubntu 17.10.
How to change git command for example
git add . command like ga,git commit command like gcgit push commans lije `gpother example like $ git add command like $ ga
when i typing ga then it work like git add
Consider using Git aliases e.g.
git config --global alias.co checkout https://git-scm.com/book/en/v2/Git-Basics-Git-Aliases
To achieve exactly what you want you can use bash aliases
in your bash prompt type
alias ga="git add ." This will only be valid until you close your shell. To have your aliases be persistent add them to your ~/.profile file.
echo 'alias ga="git add ."' >> ~/.profile Ubuntu uses ~/.profile instead of ~/.bash_profile.
Best of luck!
echo 'alias gst="git status"' >> ~/.bashrc worked for me in Ubuntu18.04.You want to use aliases within your shell. For Bash:
echo "alias ga='git add .'" >> ~/.bash_profile echo "alias gc='git commit'" >> ~/.bash_profile echo "alias gp='git push'" >> ~/.bash_profile Or, for ZShell
echo "alias ga='git add .'" >> ~/.zshrc echo "alias gc='git commit'" >> ~/.zshrc echo "alias gp='git push'" >> ~/.zshrc Once run, simply open your new terminal.
If i understood your question correctly then below is detailed explanation of how to use alias
git sub-command. So instead of git push, you can alias that to be git p -- i.e. the alias only applies to the git command, not the parent git cli. Hope that makes sense.