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
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Retrieving notes from the remote repository


So far, we have been creating notes in our own local repository, which is okay. But if we want to share those notes, we have to be sure to be able to push them. We would also like to be able to retrieve other people's notes from the remote repository. Unfortunately, this is not so plain and simple.

Getting ready

Before we can start, we need another clone from the local clone we already have. This is to show the push and fetch mechanism of Git with git notes:

  1. Start by checking out the master branch:

    $ git checkout master
    Checking out files: 100% (1529/1529), done.
    Switched to branch 'master'
    Your branch is up-to-date with 'origin/master'.
    
  2. Now, create local branches of all the stable-3.x branches:

    $ git branch stable-3.0 origin/stable-3.0
    Branch stable-3.0 set up to track remote branch stable-3.0 from origin.
    $ git branch stable-3.1 origin/stable-3.1
    Branch stable-3.1 set up to track remote branch stable-3.1 from origin.
    $ git branch stable-3.2 origin...