git-subtree

Merge error after converting Git submodule to subtree

删除回忆录丶 提交于 2019-12-03 15:18:21
问题 I have a project where I was originally using submodules for some dependent code. It turns out that submodules are not really appropriate for this project (and they are hard to use in practice), so I am converting each submodule to a subtree (using the new git-subtree feature). In my working repository, I have successfully removed each submodule and have added the old submodule repo as a subtree. No problem with this. When I go to another clone and attempt to pull from the first one, I get

Best practices for multiple git repositories

风流意气都作罢 提交于 2019-12-03 13:19:22
I have around 20 different repositories. Many are independent and compile as libraries but some others have dependencies among them. Dependency resolution and branching is complicated. Suppose that I have a super project that only aggregates all other repositories. It is used exclusively to run tests -- no real development goes here. /superproject [master, HEAD] /a [master, HEAD] /b [master, HEAD] /c [master, HEAD] /... Now, to develop specific features or fixes for each one ( a ), especially one of those that require specific versions of projects to compile or run ( b v2.0 and c 3.0 ) I have

Merge changes from one repo to another with different tree structures

自古美人都是妖i 提交于 2019-12-03 11:22:48
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. You can split the changes out to the subtree level, and then merge with your other branch: # from your foo project git subtree split --prefix=dirA/dirB/ --branch=temp-branch [--onto=<onto-sub-note1>] [<commit-sub-note2>] onto sub

Why is the `git subtree` not working even though I have git 1.8.3.2 installed on Ubuntu 12.10?

人盡茶涼 提交于 2019-12-03 06:30:35
问题 I am about to deploy my AngularJS based static site as a Github Page with Yeoman. Step 3 of the deployment instructions tell me to do git subtree push --prefix dist origin gh-pages but when I enter that I get git: 'subtree' is not a git command. See 'git --help'. This SO answer provided me instructions on how to upgrade to the latest git-core and ensure it always get upgraded to the latest stable release. sudo add-apt-repository ppa:git-core/ppa sudo apt-get update sudo apt-get install git

How do I install git-subtree with Cygwin in Windows 7?

烈酒焚心 提交于 2019-12-03 06:10:57
问题 I'm struggling to install git-subtree with Cygwin and there hasn't been any good tutorials online focused on building from source in Windows. Have you ever had this issue, and what is the best strategy to tackle it? 回答1: git-subtree is not part of a package. However, like gitk you can manually install it wget rawgit.com/git/git/master/contrib/subtree/git-subtree.sh install git-subtree.sh /bin/git-subtree 来源: https://stackoverflow.com/questions/27109525/how-do-i-install-git-subtree-with-cygwin

Reduce increasing time to push a subtree

旧时模样 提交于 2019-12-03 06:03:38
I'm using git in my project, which consists of several sub-projects. Each sub-project is "linked" in the main project using the git-subtree command. That's my way to realize "svn externals" in git . I'm using it since some weeks, but the time pushing my changes from the subtree to the remote location increases during every commit. It looks like this, when I'm pushing the changes using the command git subtree push -P platform/rtos rtos master git push using: rtos master 1/ 215 (0)2/ 215 (1)3/ 215 (2)4/ 215 (3)5/ 215 (4)6/ 215 (5)7/ 215 (6)8/ 215 (7)9/ 215 (8)10/ 215 (9)11/ 215 (9)12/ 215 (10)13

Convert Git submodule to subtree

孤者浪人 提交于 2019-12-03 05:55:21
问题 How can I convert a git submodule (with a folder in the local file system as a remote) to a git subtree, preferably preserving the commit history of the submodule? 回答1: The following bash script is based on Alexander Mikhailian's post (http://mikhailian.mova.org/node/233). I modified it slightly to call subtree add instead of read-tree . It will fetch the list of submodules from the .gitmodule and extract the module's prefix, name and url. It then removes each submodule and adds them back as

Git subtree: Use only subrepository instead of whole repository

孤街醉人 提交于 2019-12-03 05:14:28
I have a project that uses some 3rd Party libraries. So the directory structure is something like: MY_COOL_PROJECT 3rdParty LIB_1 LIB_2 Source MY_PROJECT The libraries are located in separate repositories. So, if I want to use a git repository for the 3rd Party libraries I can do: git subtree add --prefix 3rdParty/LIB_1 --squash http://My3rdPartyLibs.com/lib1.git master However, inside lib1.git repository there is only one bin folder I need. It contains also folders such as documentation, examples, etc. How can I only "connect" my repository with lib1/bin folder instead of the whole repository

Merge error after converting Git submodule to subtree

霸气de小男生 提交于 2019-12-03 04:59:55
I have a project where I was originally using submodules for some dependent code. It turns out that submodules are not really appropriate for this project (and they are hard to use in practice), so I am converting each submodule to a subtree (using the new git-subtree feature). In my working repository, I have successfully removed each submodule and have added the old submodule repo as a subtree. No problem with this. When I go to another clone and attempt to pull from the first one, I get the following error from the merge step: error: The following untracked working tree files would be

git-subtree: Push changes from an cloned repo

走远了吗. 提交于 2019-12-02 23:51:34
I'm using git-subtree(from Avery Pennarun). In my current git repo I have of course all my project files/folders and a subtree called "lib". If I now clone this git repo using git clone I get all of the project files and the subtree "lib" (everything as it should be). What I tried now: I changed something within the subtree "lib" in the cloned repo and tried to push the changes back to the remote repo of the subtree "lib" using git subtree push , but it didn't work. What is the problem? Do I have to add it as subtree first with git subtree add? Thx in advance Disclaimer, I suspect I am only a