[PATCH] git-notes.txt: Explain how to transfer notes between repos

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The documentation for git notes did not mention anywhere how to transfer
notes between repositories, create a section that explains this topic.

Signed-off-by: Øyvind A. Holm <sunny@xxxxxxxxxxx>
---
 Documentation/git-notes.txt | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/Documentation/git-notes.txt b/Documentation/git-notes.txt
index 310f0a5..4237bec 100644
--- a/Documentation/git-notes.txt
+++ b/Documentation/git-notes.txt
@@ -264,6 +264,45 @@ prior to the merge, these will also be removed by this notes merge
 strategy.
 
 
+TRANSFERRING NOTES ACROSS REPOSITORIES
+--------------------------------------
+
+Notes are not transferred by default when using the standard
+fetch/push commands, but has be done explicitly. To fetch all notes
+from a particular remote, use
+
+------------
+$ git fetch origin refs/notes/*:refs/notes/*
+------------
+
+`git fetch` can be configured to automatically fetch notes from a
+remote with this command:
+
+------------
+$ git config --add remote.origin.fetch +refs/notes/*:refs/notes/*
+------------
+
+To transfer notes to a remote repository:
+
+------------
+$ git push origin refs/notes/*
+------------
+
+If you don't want to fetch or push all notes stored under
+`refs/notes/`, replace the asterisk with the specific type of notes
+you want to transfer:
+
+------------
+$ git fetch origin refs/notes/commits:refs/notes/commits
+------------
+
+or
+
+------------
+$ git push origin refs/notes/commits
+------------
+
+
 EXAMPLES
 --------
 
-- 
2.1.0.127.g0c72b98

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]