git-submodules

Display unpushed commits in git submodules

前提是你 提交于 2021-02-07 21:50:22
问题 I know there is some questions already around there as this one. In my case: Let's say I have a repo R1 with a submodule SR2. I do a submodule commit in SR2. I commit the submodule update in R1 I push the submodule update in R1 I forgot to push in SR2 Then anyone who will clone repository R1 will get a reference is not a tree error, because obviously the submodule commit revision is only available locally currently. If I then type git status in R1 repository, nothing warns me about the fact

Display unpushed commits in git submodules

亡梦爱人 提交于 2021-02-07 21:49:49
问题 I know there is some questions already around there as this one. In my case: Let's say I have a repo R1 with a submodule SR2. I do a submodule commit in SR2. I commit the submodule update in R1 I push the submodule update in R1 I forgot to push in SR2 Then anyone who will clone repository R1 will get a reference is not a tree error, because obviously the submodule commit revision is only available locally currently. If I then type git status in R1 repository, nothing warns me about the fact

How to prevent detached HEAD when merging?

天大地大妈咪最大 提交于 2021-02-07 14:29:45
问题 Is there any way to config Git to reject a merge if the action will result in a detached HEAD? I know how to solve the detached HEAD, but I would rather have git to reject the merge-action to avoid the detached HEAD entirely. The issue occurs when this happens: I am working on a develop branch in the main repo and I also comitted some changes in a submodule repository. The develop branch is updated to match the newest commit of the submodule. A colleague wants to merge develop into the master

Why does git submodule update fail with “fatal: remote error: upload-pack: not our ref”?

馋奶兔 提交于 2021-02-07 14:16:09
问题 I have a git repo with multiple submodules. I have tried deleting and adding the submodule in question (scopatz's nanorc), however the error persists across the deletion and re-addition. When I clone the repo to a new location I automatically update it with git submodule update --init --recursive , which is when this fails, but only for this submodule... Below is the relevant output from the command with GIT_TRACE=2 : 23:01:26.918691 run-command.c:1569 run_processes_parallel: preparing to run

submodules git visual studio “fatal: unexpected sequence in commit output” can they just checkin?

跟風遠走 提交于 2021-02-07 11:21:46
问题 Any reason why git submodules in Visual Studio 2017 just don't want to checkin? I keep getting fatal: unexpected sequence in commit output Seems like sometimes they DO checkin, but most of the time they don't. Am I misunderstanding something? 回答1: In my case the problem was that not all the files had been saved when trying to commit. This showed me where to look. "I got this exception when the file with changes I was attempting to commit was not saved" 回答2: With assistance from the main

Modular Java Application on GIT repository

老子叫甜甜 提交于 2021-02-07 10:54:33
问题 I'm working on a "modular Java application", it has around 60 independent modules, all obviously "buildable" on their own. I'm trying to understand what can be the best approach to structure this type of application under GIT. I'll explain better myself: I've been working several years with SVN and it would be really easy for me to structure a project like this under a centralized version control tool such as SVN, while I'm not sure about the GIT best practices and pros/cons. With SVN: I

Modular Java Application on GIT repository

匆匆过客 提交于 2021-02-07 10:54:31
问题 I'm working on a "modular Java application", it has around 60 independent modules, all obviously "buildable" on their own. I'm trying to understand what can be the best approach to structure this type of application under GIT. I'll explain better myself: I've been working several years with SVN and it would be really easy for me to structure a project like this under a centralized version control tool such as SVN, while I'm not sure about the GIT best practices and pros/cons. With SVN: I

Modular Java Application on GIT repository

…衆ロ難τιáo~ 提交于 2021-02-07 10:54:00
问题 I'm working on a "modular Java application", it has around 60 independent modules, all obviously "buildable" on their own. I'm trying to understand what can be the best approach to structure this type of application under GIT. I'll explain better myself: I've been working several years with SVN and it would be really easy for me to structure a project like this under a centralized version control tool such as SVN, while I'm not sure about the GIT best practices and pros/cons. With SVN: I

How to checkout old git commit including all submodules recursively?

走远了吗. 提交于 2021-02-05 19:56:52
问题 I have a git repo with multiple submodules. One of those submodules has multiple submodules of it's own. All I'm looking to do is check out an old commit on the master repo and have it checkout the appropriate commits from all submodules to get the correct state of the code at that time. I know that git contains the information necessary as the ls-tree command can tell me which commit each submodule was on. However, I have to manually check out each one, which is painfully time consuming. I'm

How to checkout old git commit including all submodules recursively?

a 夏天 提交于 2021-02-05 19:54:31
问题 I have a git repo with multiple submodules. One of those submodules has multiple submodules of it's own. All I'm looking to do is check out an old commit on the master repo and have it checkout the appropriate commits from all submodules to get the correct state of the code at that time. I know that git contains the information necessary as the ls-tree command can tell me which commit each submodule was on. However, I have to manually check out each one, which is painfully time consuming. I'm