Book Image

Git Version Control Cookbook

By : Aske Olsson, Rasmus Voss
Book Image

Git Version Control Cookbook

By: Aske Olsson, Rasmus Voss

Overview of this book

Table of Contents (19 chapters)
Git Version Control Cookbook
About the Authors
About the Reviewers

Pushing notes to a remote repository

We have tried and succeeded in retrieving the notes from the remote repository, but what about your notes? How can you push them to the server? This has to be done with the push command just as with any other references, such as branches and commits, when you want to publish them to a remote repository.

How to do it...

Before we can push the notes from the shareNotes repository, we have to create a note to be pushed, as the notes we have now are all available on the remote repository. The remote repository in this case is the chapter5 directory:

  1. I have found a commit I would like to add a note to, and I want to add the note in the verified reference:

    $ git notes --ref verified add -m "Verified by [email protected]" 871ee53b52a
  2. Now that we have added the note, we can list it with the git log command:

    $ git log --notes=verified -1 871ee53b52a
    commit 871ee53b52a7e7f6a0fe600a054ec78f8e4bff5a
    Author: Robin Rosenberg <[email protected]>