From the course: Use Git Like a Pro by Pearson
Unlock this course with a free trial
Join today to access over 25,600 courses taught by industry experts.
Learn Git aliases
From the course: Use Git Like a Pro by Pearson
Learn Git aliases
In Git, we are basically dealing with a lot of commands and some of these commands are really long. So what we can do is that we can set up aliases for those long commands so that it's easy for us to use. Let's see how we can do it. The first way I'm going to show you is using the git config. So we would be adding aliases for the commands in the git config. Let's see how to do this. So let's open our code.gitconfig. Let's open our config file. And here I want to, there are already some aliases existing. So basically, you can add S for status. Let's say I want to add PP for push, or just P for push, or actually pull. So let's say P for pull, S for status, L for log. So instead of using now the whole commands, I can use this abbreviations like aliases. So if I just go and here I use, instead of get status, so this tells me the status, but I can use get S and that will execute the same command. If I want to do the log, then I can do git l and this will tell me the log. So this is git log…