0

I recently came across some old paper documentation for a project I have archived in Git that is not reflected in the commits. Not wanting to rebase and amend all the various commits and rewrite history I decided to add the new found information via Git Notes. I entered the notes in my local repository.

Now I've found that I can't push these notes to the remote repository, however.

I tried the following commands: git push "origin_ssh" "/refs/notes/*"

git push "origin_ssh" /refs/notes/commits

git push "origin_ssh" /refs/notes

All of these give the error fatal: remote part of refspec is not a valid name in /refs/notes

What am I doing wrong here? How do I push the notes to the remote repository?

Trashman
  • 1,424
  • 18
  • 27
  • 3
    Have you tried the commands here verbatim: http://stackoverflow.com/questions/18268986/git-how-to-push-messages-added-by-git-notes-to-the-central-git-server , don't prefix refs with a / – nos Sep 27 '16 at 17:08
  • 1
    Yes, the `/` was it. Thank you for the comment. Funny that thread did not come up in my search before I posted. It was exactly what I needed. – Trashman Sep 27 '16 at 18:25
  • 1
    Possible duplicate of [git: how to push messages added by git notes to the central git server?](https://stackoverflow.com/questions/18268986/git-how-to-push-messages-added-by-git-notes-to-the-central-git-server) – derobert Aug 22 '17 at 12:30

1 Answers1

0

Solution: Don’t add a slash before refs/notes/*.

Carl Winbäck
  • 323
  • 4
  • 10