Questions tagged [.git-info-grafts]

`.git/info/grafts` lets you preserve git history between different repositories by enabling two otherwise different lines of development to be joined together.

Graft points—or grafts—enable two otherwise different lines of development to be joined together. It works by letting users record fake ancestry information for commits. This way you can make git pretend the set of parents a commit has is different from what was recorded when the commit was created.

6 questions
2
votes
1 answer

Changing the commit message while grafting a large number of changesets using Mercurial

I need to graft a large number (thousands) of small changesets from branch A to branch B - but need to alter the commit message in the process. The message change needs to look roughly like this: "Ref XXX: Fixed foo and bar" -> "GRAFT: Ref YYY:…
1
vote
3 answers

Cloning a GIT branch to another repositories GIT branch?

I have two GIT repositories, one for work and one for independent development. My company expressed interest in a project I've been working on and would like me to migrate that branch (master) into a new branch on their repo (Features/Dynamo). I…
ehime
  • 8,025
  • 14
  • 51
  • 110
1
vote
1 answer

echo into grafts does not work

I have a big repository with more than 300,000 commits. I wanna work just with recent commits. So, I used the following command: echo "" > .git/info/grafts But it does not work, since after that I ran git log, again it returned all the commits. The…
0
votes
1 answer

How do I combine Git repositories?

I am trying to combine 2 repositories into 1, by grafting the history. I would assume this is the easiest way to obtain a clean linear history. I tried do so by adding the other as a remote to an initial repository: git init echo "Hello" >…
0
votes
1 answer

Introduce merges in grafted Git history

I'm currently importing an SVN repository into Git. The structure of the SVN repository is a bit messy so I'm having to convert it into three separate Git repositories and then merge them all together. If these was a simple project with three…
jkeirstead
  • 2,881
  • 3
  • 23
  • 26
0
votes
1 answer

Can git grafts be used after a division of a big repo?

Take the case when a big chunk of some parent repository is taken as a mostly starting point for another child repository, deleted from the original, and made a submodule instead. (All of this has already been completed and is in the past now.) I…
cnst
  • 25,870
  • 6
  • 90
  • 122