Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git: how to push messages added by git notes to the central git server?

Tags:

git

it seems like there is no proper documentation regarding git notes. I have added some notes to one of the commit using git notes add command. but when i push the commit, and later do a separate clone, i dont see the note message there. Is there a way to push all the note messages added via git notes command?

like image 290
Iowa Avatar asked Aug 16 '13 08:08

Iowa


People also ask

How do I push notes in git?

To always push notes add push = +refs/notes/*:refs/notes/* to the remote origin section in the Git config.

How do I push a git repository to a remote server?

In order to push a Git branch to remote, you need to execute the “git push” command and specify the remote as well as the branch name to be pushed. If you are not already on the branch that you want to push, you can execute the “git checkout” command to switch to your branch.

What is sync and push in git?

It's commit to your local repo, pull to sync(merge) the remote repo with your local repo and then it pushes the merged local repo to the remote repo. – A.sharif.


1 Answers

Push all notes:

git push <remote> refs/notes/*

Fetch all notes:

git fetch origin refs/notes/*:refs/notes/*

[[git-scm.org] (archive)]

like image 87
simont Avatar answered Oct 24 '22 19:10

simont