git-subtree

History of subtree merged files

拟墨画扇 提交于 2019-12-06 09:44:22
I wanted to merge a folder from one repository to another according to the subtree merge method (according to How do you merge two Git repositories? and http://nuclearsquid.com/writings/subtree-merging-and-you/ ) Now I'm confused since the files I added seem to have forgotten their history: git log -p oneMergedFile gives me a diff looking as if the file was newly added, while git log gives me the full history, i.e. containing the history of the merged branch. How can I get the entire history for oneMergedFile ? -p oneMergedFile only shows the changes made to that file. Perhaps it wasn't part

git subtree pull -P whatever <repo> <ref> always merge conflict

人盡茶涼 提交于 2019-12-06 05:56:15
问题 The problem : I'm getting a merge conflict every time I try to pull into my subtree even when I have no changes. What I'm doing : In subtree-repo # Make some changes $ git commit -am 'Changes made' $ git push origin master In main-repo $ git subtree add --prefix public/common {{subtree-repo}} master --squash # Make some changes $ git commit -am 'Changes made' $ git subtree push --prefix public/common {{subtree-repo}} master In subtree-repo $ git pull origin master # Make some changes $ git

Pushing subtrees in a git repo

我怕爱的太早我们不能终老 提交于 2019-12-06 02:41:39
问题 I'm quite new to Git: I come from SVN and there I found really powerfull the :external feature. Here in Git I haven't find something similar: submodules are perfect for adding project modules that are not always required. They must be initialized after the repo cloning and you can't include only a subdir of the original project. subtrees are really good for adding libraries (they also allow subdir inclusion), but pushing them is a real pain. So the scenario is this: I have a project, in which

Deploy git subdirectory on heroku

帅比萌擦擦* 提交于 2019-12-06 02:07:58
问题 I have to deploy a git subdirectory from a non master branch. I have looked at this answer and to the docs on Heroku, but when I issue git subtree push --prefix visualizations heroku develop:master I get the following error error: src refspec d02911f4e410256fae0760f87f186289436ff98b:refs/heads/develop does not match any And I really don't know how to proceed. 回答1: The git subtree push command does not use the localBranch:remoteBranch syntax used in the plain git push to define what local

Git subtree export and re-import woes

∥☆過路亽.° 提交于 2019-12-05 18:47:18
I have a larger git repository (A) that shares a certain amount of code with another project (B) of mine. To make maintenance easier, I decided to have a third repository with the common code (C) which will then be used via git subtree . I prepared everything in A (putting the common code in folder "sub") and used the procedure described in Detach (move) subdirectory into separate Git repository to create C Now that I have C with just a few commits, I wanted to put it back into A, folder sub. I used the approach described in http://www.kernel.org/pub/software/scm/git/docs/howto/using-merge

Moving a git subtree into different repository

旧巷老猫 提交于 2019-12-05 18:18:24
I try to move a directory and all its history from repository to another repository. Extracting the complete history of the directory is easy with git subtree split . This creates a new branch, which can easily be fetched to the other repository. Now I used git subtree add to paste the directory back into the second repository. If I look at gitk or git log --decorate --graph everything looks fine. All commits are present as expected. Also all the files are present as expected. But when I try to see the history of a transplanted file using git log -- transplanted_dir/somefile , I only see the

How to deal with partial svn:externals when migrating to Git?

跟風遠走 提交于 2019-12-05 11:58:24
I would like to import a SVN repository into a GitHub Enterprise repository There are many questions related to this matter and most of them can be addressed either with Git submodules or Git subtree. In my case I have two repositories: The main project repository The modules repository (a big SVN repository over 2 GB) This module repository has the following architecture: foolib/ moduleA/ ... moduleB/ ... ... For the project, only few modules from foolib are used as svn:externals . For example this main project only uses moduleA from foolib . As mentioned in this question one possible

How do I append one git history to another?

荒凉一梦 提交于 2019-12-05 08:01:07
I have a repository that contains the code for an old version of a website that is no longer being used on master . The site was completely redesigned in a new repository, and the code and history from that repository was copied over into a branch in the repo of the old site, let's call it new_site . I can't merge new_site into master , since the histories are entirely different. I've investigated both submodules and subtree merges a bit, but both seem to only be relevant when you're trying to keep code from one project contained in a subdirectory of another project, not when you want to stick

Git subtree merge strategy or subtree command?

こ雲淡風輕ζ 提交于 2019-12-05 01:33:05
问题 I'm starting a new Zend Framework project in which I will collaborate with a designer. I'm going to maintain this project code using git and usually designers don't speak git (or any programming language) so I wanna make things easy for him, otherwise I'm afraid he won't use git at all. My plan is to give him some Git gui and with that he should use only basic git features such as commit, diff, fetch, merge, push and pull. I'm using gitolite to maintain the shared copy of our git repository

Merge changes from one repo to another with different tree structures

本秂侑毒 提交于 2019-12-04 17:37:16
问题 I have two Git repos, foo/master and bar/master: In foo: code_root ->dirA ->dirB -> *some files* In bar: code_root -> *same files as above* Now someone has made changes to *some files* ... how do I get those changes merged into *same files as above* ? When I say "merged" I mean I need the history (commit messages, log hashes etc.) of the deltas to come over as well. 回答1: You can split the changes out to the subtree level, and then merge with your other branch: # from your foo project git