git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* under what circumstances will git replacements be pushed/pulled
@ 2020-01-13 17:24 peter green
  2020-01-13 17:47 ` Elijah Newren
  0 siblings, 1 reply; 2+ messages in thread
From: peter green @ 2020-01-13 17:24 UTC (permalink / raw)
  To: git

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.

However there is something that is concerning me, https://git.wiki.kernel.org/index.php/GraftPoint says

 > As of Git 1.6.5, the more flexible git replace has been added, which
 > allows you to replace any object with any other object, and tracks
 > the associations via refs which can be pushed and pulled between repos.

However the git-replace man page makes no mention of push or pull.

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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: under what circumstances will git replacements be pushed/pulled
  2020-01-13 17:24 under what circumstances will git replacements be pushed/pulled peter green
@ 2020-01-13 17:47 ` Elijah Newren
  0 siblings, 0 replies; 2+ messages in thread
From: Elijah Newren @ 2020-01-13 17:47 UTC (permalink / raw)
  To: peter green; +Cc: Git Mailing List

On Mon, Jan 13, 2020 at 9:31 AM peter green <plugwash@p10link.net> wrote:
>
> 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.
>
> However there is something that is concerning me, https://git.wiki.kernel.org/index.php/GraftPoint says
>
>  > As of Git 1.6.5, the more flexible git replace has been added, which
>  > allows you to replace any object with any other object, and tracks
>  > the associations via refs which can be pushed and pulled between repos.
>
> However the git-replace man page makes no mention of push or pull.
>
> 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.

People have to take special steps to push or pull replace refs.

Replace refs are special refnames in the refs/replace/ hierarchy.
Since clones by default only grab stuff under refs/heads/ and
refs/tags/ and set up fetches to do likewise, you don't get these by
default.  None of the push.default settings (simple, upstream,
matching, current) will push these either.  So, if the user wants to
transfer replace refs, they either need to manually call out the
refspecs, use a special fetch/push flag like --mirror, or set up a
special remote.<name>.fetch or remote.<name>.push config setting.

In other words, your replace references are local-only by default.
Anyone who wants to share them will have to be the ones to take
special steps, and likely at more than one stage (e.g. a special step
to push them to some central repo, and notify your co-worker of the
special commands they have to use to fetch them).

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-13 17:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-13 17:24 under what circumstances will git replacements be pushed/pulled peter green
2020-01-13 17:47 ` Elijah Newren

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).