git-subtree

Follow renames when performing git subtree split

你离开我真会死。 提交于 2019-12-31 09:34:06
问题 I have a number of subdirectories that I want to pull out into a separate repo. In order to extract these with a single command I move (rename) them to a single subdirectory inside the root. I then run: git subtree split -P my_new_subdir -b newbranch If I then checkout this new branch and run git log --follow someoldfile it only shows me the log entries pertaining to the move into the temporary subdirectory. I want to carry over the full history of those files. Is there a way to preserve full

git-subtree without squash: view log

跟風遠走 提交于 2019-12-29 06:12:25
问题 I merged a tree onto a my repository by using git subtree add without the squash option. A git log shows that the commits were successfully added to the repository. However, if I do a git log --follow filename , the history stops at the merge and does not show previous commits. I tried using -M instead of --follow and that doesn't work either. How can I get a log of the commits for a specific file or files from before the merge? 回答1: Actually, git log --follow should work with subtree merges,

git-subtree without squash: view log

。_饼干妹妹 提交于 2019-12-29 06:11:27
问题 I merged a tree onto a my repository by using git subtree add without the squash option. A git log shows that the commits were successfully added to the repository. However, if I do a git log --follow filename , the history stops at the merge and does not show previous commits. I tried using -M instead of --follow and that doesn't work either. How can I get a log of the commits for a specific file or files from before the merge? 回答1: Actually, git log --follow should work with subtree merges,

Git confused when merging an update into my subtree

心已入冬 提交于 2019-12-28 11:46:48
问题 We previously used many submodules in our main repositories, but to increase the maintainability of our projects we started an experimental branch where we replaced them all with subtrees. This worked good - but now when I'm trying to update one of the subtrees it erroneously merges the update into a completely wrong directory that isn't even a subtree. The main repository, where the branch "subtree" contains the experimental branch, is: git://github.com/hugowetterberg/goodold_drupal.git The

Can't push subtree using sourcetree

人盡茶涼 提交于 2019-12-23 09:59:33
问题 I'm looking to use git subtree to use a framework repo that I own in my project repo. This should look like this: project Some stuff Some stuff framework Using Sourcetree app for windows I made the following: Clone project Add Subtree framework in a folder named framework Add test.txt in framework That leads me to something like this: project Some stuff Some stuff framework test.txt Sourcetree then tells me that test.txt is not staged for commit so I add it and commit it. I might be using it

Git: Get a subfolder from a repository to a new one without losing history

▼魔方 西西 提交于 2019-12-22 10:45:48
问题 I have a git repository of an application with multiple branches. The source tree consists of several directories. E.g: main_folder |--> .git |--> dir0 |--> dir1 |--> dir2 Unfortunately, from the beginning of the development I didn't use git-submodules nor git-subtree . Now I want to move one of the directories, e.g dir0 to a new repository as a new stand-alone application, Of course if possible, I want to keep both history and branches of the corresponding directory. So I have two questions:

How to figure out a working copy contains a subtree?

冷暖自知 提交于 2019-12-22 08:36:54
问题 let's assume we've the following working copy structure: . ├── adm └── etc with $ git remote -v origin git@github.com:xxx/my.git (fetch) origin git@github.com:xxx/my.git (push) Now, let's assume we've added a sub-project via git subtree : git remote add extlip git@github.com:yyy/ExtLib.git git subtree add -P tech -m "added extlib as a sub-project" extlib/master Such that . ├── adm ├── etc └── tech with $ git remote -v origin git@github.com:xxx/my.git (fetch) origin git@github.com:xxx/my.git

Best practices for multiple git repositories

折月煮酒 提交于 2019-12-21 04:43:07
问题 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

Reduce increasing time to push a subtree

两盒软妹~` 提交于 2019-12-20 17:37:33
问题 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/

git-subtree: Push changes from an cloned repo

瘦欲@ 提交于 2019-12-20 10:38:10
问题 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