Time for action – adding complex aliases using GUI

Git Gui already has shortcuts for pretty much everything you will usually need, which we have been learning as we come across different topics, so let's understand how to chain commands using Git Gui.

  1. Open Git Gui and select the Add option from the Tools menu, which will give you an Add Tool window as follows:
    Time for action – adding complex aliases using GUI
  2. Enter the following values in the respective fields:

    Field name

    Field value

    Name

    Add and status

    Command

    git add . && git status

  3. Click on the Add button.

    Now you will see the newly created alias as a menu item inside the Tools menu, as shown in the following screenshot:

    Time for action – adding complex aliases using GUI

What just happened?

We have practically learned that we can create comfortable aliases for lengthy commands that we frequently use. We also learned and practiced methods to combine multiple commands and execute them in order, using both the CLI and GUI modes.

Tip

Homework

Create a simple alias for git log.

Then, create a chain with two commands and call it clog (git commit and git log) in such a way that when you type git clog "my_commit_message_here", your changes will shift from the changes to be committed state to nothing to commit state (which means the changes that were added but not committed are now committed with the commit message provided) continued by a listing of all the commits and their relevant details (which are usually displayed when using the command git log).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.27.232