Skip to Content
Git: Mastering Version Control
book

Git: Mastering Version Control

by Ferdinando Santacroce, Aske Olsson, Rasmus Voss, Jakub Narębski
October 2016
Beginner
861 pages
20h 37m
English
Packt Publishing
Content preview from Git: Mastering Version Control

Adding your first Git note

We will add some extra information to the already released code. If we were doing it in the actual commits, we would see the commit hashes change.

Getting ready

Before we start, we need a repository to work in; you can use the previous clone of jgit, but to get an output from the example that's almost identical, you can clone the jgit repository as follows:

$ git clone https://git.eclipse.org/r/jgit/jgit chapter5
$ cd chapter5

How to do it…

We start by creating a local branch notesMessage tracking origin/stable-3.2. Then, we will try and change the commit message and see that the commit hash changes:

  1. Checkout the branch notesMessage tracking origin/stable-3.2:
    $ git checkout -b notesMessage  --track origin/stable-3.2
    Branch ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Git Version Control Cookbook - Second Edition

Git Version Control Cookbook - Second Edition

Kenneth Geisshirt, Emanuele Zattin(EUR), Aske Olsson, Rasmus Voss
Git Pocket Guide

Git Pocket Guide

Richard E. Silverman

Publisher Resources

ISBN: 9781787123205Supplemental Content