In today's post I bring you a series of commands to Git On Windows (aliases, to be exact), that will increase your productivity by working with this tool, because it is a way to synthesize and condense orders in small words.
For some time I've been working on a relatively large project with a development team of eight people of different profiles. You can imagine the amount of commits and merge-requests that have to be managed every day, not to mention the Code reviews Or branch changes in mid-development to advance in other respects.
Tired of having to type a sausage kind
git add-u & & Git Commit-M "This commit contains these changes"
Every time I wanted to confirm a change, for example, I looked for a way to generate aliases on my console Git for Windows. And it has been much easier than I expected, although some steps must be followed:
1. The. bash_profile file
Look for the . Bash_profilefile, which must be in C:\Usuarios\Tunombredeusario\. If you don't see it or not, create it yourself and add the following lines:
With this what we do is to indicate to our console that you must accept the G command and interpret it as git. A series of commands are also added that will allow us to use the auto-complete feature (when using the TAB key). With that, we are saving two clicks when we launch our orders Git.
2. The. gitconfig file
Now we have to look for the . Gitconfig file that should be on the same route as before. If you don't see it, or it's not, believe it yourself.
The first lines of the file, in my case, are like this:
These configuration parameters allow you to automatically send my email and my name when you push it.
Following these lines, I have put in these aliases :
As you can see, they are distributed in blocks for better readability and organization. Some are more useful or elaborate, but
To make use of these new aliases, you just have to restart the Git console. Check that you have done well using the last of all commands, GLA, which as we can see what it does is list all the aliases we have configured. Useful, right?
Now you just have to try and adapt these commands to your specific needs. If you have questions about how to use them, leave me a comment and I will try to help you.