{"thread":{"id":"52627","subject":"under what circumstances will git replacements be pushed/pulled","startedAt":"2020-01-13T17:29:46Z","lastAt":"2020-01-13T17:47:36Z","messageCount":2,"participants":["peter green","Elijah Newren"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"389718","messageId":"7adb48ad-299d-bbec-c467-b29376583486@p10link.net","threadId":"52627","inReplyTo":null,"subject":"under what circumstances will git replacements be pushed/pulled","fromName":"peter green","fromEmail":"plugwash@p10link.net","sentAt":"2020-01-13T17:24:13Z","receivedAt":"2020-01-13T17:29:46Z","isPatch":false,"sender":{"key":"plugwash@p10link.net","avatar":null},"body":"I need to make some local tweaks to history to make merges go more smoothly, traditionally the tool for doing this is grafts, however git is yelling at me that grafts are deprecated and will be removed in a future release and that I should use git-replace instead.\n\nHowever there is something that is concerning me, https://git.wiki.kernel.org/index.php/GraftPoint says\n\n > As of Git 1.6.5, the more flexible git replace has been added, which\n > allows you to replace any object with any other object, and tracks\n > the associations via refs which can be pushed and pulled between repos.\n\nHowever the git-replace man page makes no mention of push or pull.\n\nunder what circumstances will replacements be pushed or pulled, and what if any steps do I need to take to ensure that my replacements stay local.\n\n"},{"id":"389719","messageId":"CABPp-BH49aX=DX=p3bNZaTo8LKt=FH_J3h34Tbf2cYx+DJD2LQ@mail.gmail.com","threadId":"52627","inReplyTo":"7adb48ad-299d-bbec-c467-b29376583486@p10link.net","subject":"Re: under what circumstances will git replacements be pushed/pulled","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2020-01-13T17:47:23Z","receivedAt":"2020-01-13T17:47:36Z","isPatch":false,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Mon, Jan 13, 2020 at 9:31 AM peter green <plugwash@p10link.net> wrote:\n>\n> I need to make some local tweaks to history to make merges go more smoothly, traditionally the tool for doing this is grafts, however git is yelling at me that grafts are deprecated and will be removed in a future release and that I should use git-replace instead.\n>\n> However there is something that is concerning me, https://git.wiki.kernel.org/index.php/GraftPoint says\n>\n>  > As of Git 1.6.5, the more flexible git replace has been added, which\n>  > allows you to replace any object with any other object, and tracks\n>  > the associations via refs which can be pushed and pulled between repos.\n>\n> However the git-replace man page makes no mention of push or pull.\n>\n> under what circumstances will replacements be pushed or pulled, and what if any steps do I need to take to ensure that my replacements stay local.\n\nPeople have to take special steps to push or pull replace refs.\n\nReplace refs are special refnames in the refs/replace/ hierarchy.\nSince clones by default only grab stuff under refs/heads/ and\nrefs/tags/ and set up fetches to do likewise, you don't get these by\ndefault.  None of the push.default settings (simple, upstream,\nmatching, current) will push these either.  So, if the user wants to\ntransfer replace refs, they either need to manually call out the\nrefspecs, use a special fetch/push flag like --mirror, or set up a\nspecial remote.<name>.fetch or remote.<name>.push config setting.\n\nIn other words, your replace references are local-only by default.\nAnyone who wants to share them will have to be the ones to take\nspecial steps, and likely at more than one stage (e.g. a special step\nto push them to some central repo, and notify your co-worker of the\nspecial commands they have to use to fetch them).\n"}]}