git-submodules

Can I make git automatically update submodules when checking out a branch?

▼魔方 西西 提交于 2021-02-05 05:34:05
问题 I'm working on a git repository with some submodules, which have different revisions on different branches. When I switch branches, I get a: M path/to/subrepo Switched to branch 'another-branch' message. I then manually do: git submodule update --recursive and that goes away. I tried writing a git hook, in .git/hooks/post-checkout: #!/bin/bash exec git submodules update --recursive but this doesn't seem to do anything. I tried to add an exec echo hello from post-hook line - doesn't seem to

Why would 'git submodule update' skip a submodule?

半城伤御伤魂 提交于 2021-02-04 21:20:47
问题 I have a git repo with a single submodule sub/x . (This submodule does not contain any submodules of its own.) In the superproject's repo, the output of git status shows the following (unstaged) modification modified: sub/x (new commits) If I now run git submodule update ...on the superproject, the following line gets printed to the terminal (and nothing more): Skipping submodule 'sub/x' After this, the output of git status on the superproject remains as shown above, unchanged. (Ditto if I

Make git-submodule update from specific Host in config

蓝咒 提交于 2021-01-28 19:48:46
问题 Using this guide here I have created a work ssh-key ( id_rsa_work ) and changed my config file to # Personal GitHub account Host github.com HostName github.com User git AddKeysToAgent yes IdentityFile ~/.ssh/id_rsa # Work GitHub account Host github.com-work HostName github.com User git AddKeysToAgent yes IdentityFile ~/.ssh/id_rsa_work I have added the work ssh to my work git-repo and I can call git clone git@github.com-work:user/test.git and clone it. The problem is that there is a submodule

Azure DevOps - Use YAML templates in a Git Submodule

我的梦境 提交于 2021-01-28 07:03:35
问题 So i have 11 repositories of 1 project, they are all micro-services. I have one repository called DevOps where everything that has to be shared across YAML builds, is shared using a Git Submodule. For some reason i cant seem to reference yaml templates that are in a git module. Options: When i try to run a build by trigger or manually i get the error: File /DevOps/A/Templates/A-test-template.yml not found in repository http://A.azuredevops.local/DefaultCollection/A/_git/A branch refs/heads

Google container builder DockerFile with git submodules

一笑奈何 提交于 2021-01-28 06:35:40
问题 Our container-builder fail to build an image we have that has a private git submodule command as part of the DockerFile. I linked the console account with the bitbucket account, (which has access to all repos) but still the build fail with "access denied" to the submodule repo. in Quay.IO builder i solved this by adding the ssh-key to the submodule repository, but since Container-Builder link with my account i can't use that solution. 回答1: Handling access to private submodules is a known

tracking version numbers of subfolders in git

有些话、适合烂在心里 提交于 2021-01-28 02:57:34
问题 My team is using github to manage a private repo full of cms themes. We have them all within the same repo and keep track of them with subfolders, labels and keeping our branchs and commits prefixed with the theme name IE Commit message: "[Super Theme] upgraded Navigation to include hover effect" Branch super_theme-upgrade-navigation-hover Now we want to introduce semantic versioning into the theme's settings page so if you click about, you get the version number, but I'm not sure the best

How to install a dependency from a submodule in Python?

爱⌒轻易说出口 提交于 2021-01-26 23:14:59
问题 I have a Python project with the following structure (irrelevant source files omitted for simplicity): myproject/ mysubmodule/ setup.py setup.py The file myproject/setup.py uses distutils.core.setup to install the module myproject and the relevant sources. However, myproject requires mysubmodule to be installed (this is a git submodule). So what I am doing right now is: myproject/$ cd mysubmodule myproject/mysubmodule/$ python setup.py install myproject/mysubmodule/$ cd .. myproject/$ python

How to install a dependency from a submodule in Python?

*爱你&永不变心* 提交于 2021-01-26 23:07:21
问题 I have a Python project with the following structure (irrelevant source files omitted for simplicity): myproject/ mysubmodule/ setup.py setup.py The file myproject/setup.py uses distutils.core.setup to install the module myproject and the relevant sources. However, myproject requires mysubmodule to be installed (this is a git submodule). So what I am doing right now is: myproject/$ cd mysubmodule myproject/mysubmodule/$ python setup.py install myproject/mysubmodule/$ cd .. myproject/$ python

How to install a dependency from a submodule in Python?

北城余情 提交于 2021-01-26 23:06:41
问题 I have a Python project with the following structure (irrelevant source files omitted for simplicity): myproject/ mysubmodule/ setup.py setup.py The file myproject/setup.py uses distutils.core.setup to install the module myproject and the relevant sources. However, myproject requires mysubmodule to be installed (this is a git submodule). So what I am doing right now is: myproject/$ cd mysubmodule myproject/mysubmodule/$ python setup.py install myproject/mysubmodule/$ cd .. myproject/$ python

Clone a repo with submodules: override credentials

回眸只為那壹抹淺笑 提交于 2021-01-02 05:31:50
问题 I have to automate cloning a repository and fetching it's all submodules. The urls for repository submodules are specified at .gitmodules . If I were to go with defaults I would just do git clone --recursive https://username:password@url.git The problem is credentials aren't included in .gitmodules file and I am prompted for those when I clone. I have to use HTTPS rather then SSH. I tried to submit the credentials using git config: git clone https://username:password@url.git my_repo cd my