Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Git Version Control Cookbook
  • Toc
  • feedback
Git Version Control Cookbook

Git Version Control Cookbook

By : Olsson, Voss
4 (3)
close
Git Version Control Cookbook

Git Version Control Cookbook

4 (3)
By: Olsson, Voss

Overview of this book

This practical guide contains a wide variety of recipes, taking you through all the topics you need to know about to fully utilize the most advanced features of the Git system. If you are a software developer or a build and release engineer who uses Git in your daily work and want to take your Git knowledge to the next level, then this book is for you. To understand and follow the recipes included in this book, basic knowledge of Git command-line code is mandatory.
Table of Contents (14 chapters)
close
13
Index

More aliases

In Chapter 2, Configuration, we saw how we can create aliases and a few examples of them. In this example, we will see some more examples of the useful aliases.

Getting ready

Clone the cookbook-tips-tricks repository and checkout the aliases branch:

$ git clone https://github.com/dvaske/cookbook-tips-tricks.git
$ cd cookbook-tips-tricks
$ git checkout aliases

How to do it...

Here, we'll see some examples of aliases with a short description of each of them and an example of how to use them. The aliases are just made for the local repository; use --global to make them available for all the repositories.

  • Show the current branch only:
    $ git config alias.b "rev-parse --abbrev-ref HEAD"
    $ git b
    aliases
    
  • Show a compact graph history view with colors:
    git config alias.graph "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"
    git graph origin/conflict aliases
    
    How to do it...
  • When...
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete