git-submodules

Versions management of python packages

烂漫一生 提交于 2020-06-16 03:54:08
问题 What is a best practice to manage a different versions of packages? I know about virtualenv but i am not sure it is suitable in my case. My problem: Consider that i have 2 projects (P1, P2) which both use 1 small project (P3). I use git submodules and add P3 to both P1 and P2. Then i have P4 which uses all projects described above and P4 needs the latest version of P3. How to deal with it? I want P1, P2, P4 to use their own version of P3. But when i build P4 i have only one version of P3.

Adding git submodule into the root of the repository?

佐手、 提交于 2020-06-12 05:01:20
问题 I want to keep my Vim plugins up-to-date with git by using github repos as submodules with the help of pathogen. Everything is well except pathogen itself. For example, I have a repository in ~/.vim , at pathogen's repo has autoload directory in its root: <pathogen repo>/autoload . Is it possible to make a git submodule so that pathogen's autoload goes into ~/.vim ? ~/.vim/autoload/pathogen.vim 回答1: Clone the submodule into a subdirectory and symlink it's contents. For pathogen, I also

How to effectively review git submodule updates/rebases?

好久不见. 提交于 2020-06-09 19:42:11
问题 Our project uses a git submodule to pin one of our library dependencies. We regularly rebase the submodule to follow upstream changes, and we also have a set of commits on top of it that we cannot easily upstream. When somebody rebases the submodule, I only see this in the git diff of the parent repo: --- a/mysubmodule +++ b/mysubmodule @@ -1 +1 @@ -Subproject commit abc12345abc12345abc12345abcd12345abc1234 +Subproject commit efg67890efg67890efg67890efg67890efg67890 That is not very useful.

How to remove a submodule going forward, but keep its history (as linked from parent history)?

回眸只為那壹抹淺笑 提交于 2020-05-28 05:47:25
问题 Say I have a project that has a dependency implemented using git submodule . Now I'm making a change where this dependency is no longer needed. I want to commit a change that works as follows: If anyone checks out this commit or any descendants, the submodule doesn't exist. But if anyone checks out an older commit, or a commit on another branch not merged with this one, the submodule reappears, just as a deleted file would. The submodule's own git database (.git/modules/path/to/submodule)

How to remove a submodule going forward, but keep its history (as linked from parent history)?

我只是一个虾纸丫 提交于 2020-05-28 05:47:06
问题 Say I have a project that has a dependency implemented using git submodule . Now I'm making a change where this dependency is no longer needed. I want to commit a change that works as follows: If anyone checks out this commit or any descendants, the submodule doesn't exist. But if anyone checks out an older commit, or a commit on another branch not merged with this one, the submodule reappears, just as a deleted file would. The submodule's own git database (.git/modules/path/to/submodule)

How to shallow pull submodule that is tracked by branch name

ぐ巨炮叔叔 提交于 2020-05-26 09:21:36
问题 Hi I have a superproject that contains a submodule. The submodule is tracked by a branch name and not by a sha commit number. On our buildserver I would like to pull as minimum as possible. So I tried git submodule update --remote --init This however is not shallow. It seems like pulls everything then switches to branch git submodule update --remote --init --depth 1 This doesnt work, it fails on this: git submodule update --remote --init --depth 1 ThirdParty/protobuf Submodule 'ThirdParty

Git submodules removing on checkout another branch

喜夏-厌秋 提交于 2020-05-25 08:09:17
问题 I have several branches with features in my Git repo. Every feature is some foreign repo, plugged in as a submodule. What should I do to correct switching between branches, with and without submodules? Example: $ git init $ git commit -m "empty" --allow-empty $ git checkout -b feature $ git submodule init $ git submodule add git://feature.git feature $ git commit -a -m "add feature" $ git checkout master warning: unable to rmdir feature: Directory is not empty And we have a feature in our

Best way to migrate mercurial repo with subrepositories to git, preserving history?

两盒软妹~` 提交于 2020-05-25 07:57:07
问题 I'm trying to migrate a mercurial repository to git, but the problem is that the mercurial repository has subrepositories (some with branches), and lots of merges and branches itself. I'd like the final git repository to keep all this history and be correct and complete when checking out earlier parts of the repository or other branches. I don't need the new repository to have submodules or subtrees, although I would accept a solution using that as well. Some methods I've seen merge all the

How to fix “modified content, untracked content” in git?

我们两清 提交于 2020-05-24 14:34:32
问题 The objective is to commit a git branch. The output of "git status" for the branch is: On branch zeromq_new Your branch is up to date with 'origin/zeromq'. Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) (commit or discard the untracked or modified content in submodules) modified: log4cplus (modified content, untracked content) modified: ../lib/notification/cppzmq (modified

How to fix “modified content, untracked content” in git?

白昼怎懂夜的黑 提交于 2020-05-24 14:33:47
问题 The objective is to commit a git branch. The output of "git status" for the branch is: On branch zeromq_new Your branch is up to date with 'origin/zeromq'. Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) (commit or discard the untracked or modified content in submodules) modified: log4cplus (modified content, untracked content) modified: ../lib/notification/cppzmq (modified