For R&D or testing, git is an important tool for project version management.
But in normal times, we use git commands to view branches, merge commits and other operations. Although most of the commands are not very long, I believe that after the simplification is completed, the work efficiency will definitely be improved.
.gitconfig
Edit directly through the global config file
In Linux, .gitconfig
files are generally under the root directory.
Simplified commands can be added directly in the alias, the format is <简化后的命令> = <被简化的命令>
For example, we modify the status to st, save the .gitconfig and use it directly under the project to git st
view
Submit Simplified Commands via Command
git config --global alias.<简化后的命令> <需简化的原命令>
例如:
git config --global alias.st status
Reference
https://blog.csdn.net/thirteen_king13/article/details/118220296