Merge two Git repositories without breaking file history
I need to merge two Git repositories into a branch new, third repository. I've found many descriptions of how to do this using a subtree merge (for example Jakub Narębski's answer on How do you merge two git repositories?) and following those instructions mostly works, except that when I commit the subtree merge all of the files from the old repositories are recorded as new added files. I can see the commit history from the old repositories when I do
git log, but if I do
git log <file> it shows only one commit for that file - the subtree merge. Judging from the comments on the above answer, I'm not alone in seeing this problem but I've found no published solutions for it.
Is there any way do merge repositories and leave individual file history intact?
I am trying to remove a number of large files from my history using filter-branch. I have used this command before with success but I'm currently having trouble for a particular edge case. The problem
OK so: In svn and bzr, I can branch, commit, merge, and my commit history will look like this: 41: Theodore R. Smith 2013-09-14 Jump to list by name instead of number. 40: Theodore R. Smith 2013-09-14
I'm building an application in which you can manage GIT repositories. I have chosen to store the repository information in a database, but I'm having a problem with the passwords. Problem: When i enco
I am trying to write a tool that will automatically merge code from one branch to other. It will be a command on hubot that will merge the appropriate branches. What I am looking for is a way to do th
I'm creating a merge driver. I have defined a .gitattributes file as follows: filename merge=mergeStrategy I have created the merge driver in $PROJECT/.git/config as follows: [merge mergeStrategy] n
I'm trying to merge multiple source repositories together, maintaining version history during the process. I've been doing a lot of reading on the svnadmin dump/load process, but there's one piece tha
I moved a .js file from one folder to another manually. Now, although GIT seems to have the complete history log for the file, it still seems to treat the move as a delete/create event. Further, using
I have two branches: master and opengl. Recently I have finished implementation (or at least I though so) of opengl branch and decided to merge it into master: git checkout master git merge opengl git
Is there a way to efficiently read previous versions of files in Git? (I'm using Git as a database for Content Management System, and need it do display history). Git doesn't store full versions of fi
(solved, see bottom of the question body) Looking for this for a long time now, what I have till now is: http://dound.com/2009/04/git-forever-remove-files-or-folders-from-history/ and http://progit.o
What does it mean when a git rebase finds a conflict, but there is no apparent problem in the file? The file in question has no conflict markers, and git mergetool says nothing to merge. The options
I've looked and looked for an answer, but can't seem to find one. Lots have asked, but none have gotten answers. I have an app that have two video paths. Now I just want to merge them into one file th
How is possible to group multiple GIT repositories under some path in Gitosis? For example Qt5 in gitorious already has same structure (firstname.lastname@example.org:qt/qt5.git) where qt/ is path for grouping. Is
I have two unrelated (not sharing any ancestor check in) Git repositories, one is a super repository which consists a number of smaller projects (Lets call it repository A). Another one is just a make
I have two git repositories, one upstream, that somewhat contains the code from upstream author ( was reacted by an ad-hoc script parsing his in-house rev store ), and the other is the repository I'
I'm trying to setup CodeCompare as my git merge/diff tool, however I keep getting an error that the following line is incorrect in my .gitconfig file, I am on windows using msysgit cmd = C:\Program
This is a follow up on some similar answered questions about git handling binary files and how git can't follow file history very well. So, git can't properly follow file history. Heck, even git log
Is it possible to modify the default git-merge-one-file program to do everything in the index without touching the working tree, leaving it completely unmodified? UPDATE AND DETAILS So I understand no
I was wondering if it is possible to see individual file differences between a file (hello.txt) in my local repo and another repo of a different developer (on the same server)? I know I could do a git
I'm using git-tfs, and I was wondering if it is possible to merge two TFS branches using git-tfs. I have two branches $/MyCompany/Dev & $/MyCompany/Release-3.3. Release-3.3 originates from the Dev
So I've got a private codebase that I am co-developing with some external collaborators. I want them to be able to contribute to the code, but I don't want them to have the entire commit history of ou
I have a developer who keeps committing, and every time he does - it does a git merge branch onto branch commit; every time. Even with his own code. Ie, my history looks like this almost all the time
Within my master branch, I did a git merge some-other-branch locally, but never pushed the changes to origin master. I didn't mean to merge, so I'd like to undo it. When doing a git status after my me
How can I add all sub-repositories inside a just-initialized git repository as submodules? I have two repositories I've been tracking separately, now I want to take those into a larger project, but st
I want to take a function out of one file and put it into another, but keep the blame history. cp a.php b.php vim b.php # delete everything but 1 function vim a.php # delete the 1 function git add a.p
I work on a project that has 2 branches, A and B. I typically work on branch A, and merge stuff from branch B. For the merging, I would typically do: git merge origin/branchB However, I would also li
I am working with a developer that is new to git, and I would like to setup a git workflow that would let me auditing the commits made by this developer (and possibly reject them) without forcing him
I'm using git version 22.214.171.124 from the Arch Linux repository at home, and git version 126.96.36.199 from Ubuntu 13.10 at work. At work, we're use svn, so I deal with it using git svn. I checked out the svn
Currently when I'm using GIT I create a branch for each job and make various commits before I'm finished. I then merge back with my master branch and push upstream. I'm likely to have several branches
Say I have a file in git called filex.code, and I want to see the full code of the last x versions of that file with each changed section highlighted -- all in one place. So an x-paned commit history
Coming from CVS we have a packages directory, which contains single .git repositories for each package. Sadly, these are not as independent as the original CVS owners thought, so usually they are all
There are 3 projects each with their own git repo: Project A, a project independent of B Project B, a project independent of A Project AB, a project that uses some of A and some of B. An amalgamation
I have three branches (let's call them master, testing, and feature). All three are shared, so I cannot rebase any of them without causing problems for others. Currently, all three branches have diver
I'd like to find a string in a file's history in git, i know that to find it in all files is like this: git grep whatever $(git rev-list --all) But i'd like to find it only in the history of a file,
Say I have a huge git repository and it has a number of swfs and images in there. I want them to be included in the hosted github repository, but they don't need to be versioned, and I don't want to h
I have two git repositories, like this: proj1 proj2 proj1 has a tag v1.0.0 and proj2 has tags v2.0.0 and v2.1.0. Now I would like to merge proj1 (the v1.0.0 tag in particular) into proj2 as if it wa
How can I view git log history for all files within a folder ? I have found several posts on how to show log for a specific file, but haven't found for a specific folder.
Overview: $ git pull ... time passes ... $ git checkout topic # remote topic $ git checkout master $ git merge topic $ git push non-fast-forward updates were rejected $ git pull merge by rebase $ git
I would like to publish my git history to a public repository but would like to remove older commits. All the ways I have seen to do this alter the newer commit's SHA1s, which is not an option since I
A file couldn't be merged, how do I merge it with git?
I just did: git reset --merge and I lost my latest modifications to some files, how do I undo this last action?
My current git history looks like this: develop: A -- B -- C \ feature1: D -- E \ feature2: G -- H -- I But, I would prefer this, instead: feature2: G' -- H' -- I' / develop: A -- B -- C \ feature1:
I have two different Mercurial repositories, each with its own history. Is there a way to merge the two into one repository that would also have complete history of both?
To implement github like fork/pull request function in my project, the auto-merge feature need to detect conflict between source/target repository every time while viewing the pull request. One soluti
I want to take advantage of the git-merge algorithm on two arbitrary files in a git repo. Here is my working directory: folder/ file1 file2 file1 and file2 are similar, but I want to see how git woul
I am using code from a CVS controlled repository (@sourceforge). Instead of using it directly, I was using a git clone of it made by someone else. In my clone I have several modifications. In the mean
I have two projects, ProjectA and ProjectB. Each of them has its git repo. These projects have many of the same files. These files are in the folders named common both in ProjectA and ProjectB. Here
Dev environment: Linux If there a way to deploy with git without copying the whole meta data (history of changed)? I want to be able to push a certain branch, but I don't care much about pushing the h
I want to rewrite the git history of my repository with git-filter-branch to replace all occurrences of foo.bar with bar.foo in all files. How can I achieve this? Update: I've being playing with t
I have a different version of a file in a development branch than I do in the master. The problem is I want to track those files, so how do I merge development into master without overwriting that fil