every time I try
git submodule update --init --recursive
I recieve
Failed to recurse into submodule path 'modules/uavcan/libuavcan/dsdl_compiler/pyuavcan'
Failed to recurse into submodule path 'modules/PX4Firmware
Failed to recurse into submodule path 'modules/uavcan'
and I don't seem to understand what the actual problem is. (I'm using Ubuntu 16.04)
Related
When running a: npm version prepatch I get the error: "Git working directory not clean." And then a list of files that aren't committed yet.
However, I'd like to do this prerelease to test some stuff locally using a private npm registry. Meaning that I don't have to commit the files just yet using Git.
Is it possible to update the version in package.json without clean git working directory?
From the npm version documentation at https://docs.npmjs.com/cli/version:
If run in a git repo, it will also create a version commit and tag. This behavior is controlled by git-tag-version (see below), and can be disabled on the command line by running npm --no-git-tag-version version. It will fail if the working directory is not clean, unless the -f or --force flag is set.
I'm not 100% certain whether you just need --no-git-tag-version, or if you'll also need the --force flag.
You can use git stash.
E.g.
git stash
npm version patch
git stash pop
This will reset your working directory temporarily (remove uncommitted changes). Then you can run npm version {major|minor|patch}. Afterwards, using git stash pop will re-apply your uncommitted changes to your working directory.
Tutorial: https://www.atlassian.com/git/tutorials/saving-changes/git-stash#stashing-your-work
Try to commit first
git add . && git commit -am "new version"
and then
npm version patch
When attempting to build in the core/distributed_runtime module using:
$ bazel build -c opt
//tensorflow/core/distributed_runtime/rpc:grpc_tensorflow_server
We get the following error:
ERROR: error loading package 'tensorflow/core/distributed_runtime/rpc':
Extension file not found. Unable to load package for
'//google/protobuf:protobuf.bzl': BUILD file not found on package path.
INFO: Elapsed time: 0.097s
Are there additional steps required (and not mentioned in the README.md) ?
This sounds like a git submodule issue—and it would affect building any part of TensorFlow from source. To recover, run the following command in your git repository:
$ git submodule update --init --recursive
(There are many other ways to do the same thing: see this question for some suggestions.)
I created a repo:
git init --bare myrepo.git
Then on the same server, created the repo for production
cd /home/myuser/public_html
git init
git remote add origin /usr/local/gitroot/myrepo.git
git commit --allow-empty -m "Initial commit"
Then created the submodule
cd subdirectory
git init
git add .
git commit -m "Initial submodule commit"
cd ..
git submodule add /home/myuser/public_html/subdirectory subdirectory
git add .
git commit -m "Initial commit of base files and submodule"
git push origin master
Then on my local machine
git clone --recursive ssh://user#mydomain/path/to/git mygitdirectory
And at the tail end of what was looking like a clean clone, I get
fatal: repository '/home/myuser/public_html/subdirectory' does not exist
Clone of '/home/myuser/public_html/subdirectory' into submodule path 'subdirectory' failed
Trying git submodule add and git submodule update in subdirectory yields the same result. I ended up with all the base files, but the subdirectory being empty. On the server, git log shows the commit of the base files + submodule, and git status in both the base and the submodule shows clean.
Postscript
I blew away everything and tried again changing the submodule creation to:
git submodule add ./subdirectory ./subdirectory
which yielded a .gitmodules on the server of
[submodule "subdirectory"]
path = subdirectory
url = ./subdirectory
When doing the clone on the local machine, it resulted in the same error when it got to the submodule part. So, I changed the .gitmodules (and then did a git submodule sync) to:
[submodule "subdirectory"]
path = subdirectory
url = ssh://user#mydomain/path/to/git
Reading (many) different workflow suggestions, I find myself unsure (a) what the contents of each .gitmodules should be (I assume the server one is correct) (b) whether the remote bare repo to which the super repo on the server is pushed should be the only bare repo or whether the submodule needs one as well (I assume that once the submodule is committed in the super repo that pushing the super repo to the bare repo (origin) takes the submodule history as well), and (c) whether the local submodule needs to have a remote defined (it didn't appear to on the server, so I didn't so so locally)
Your local git is trying to clone the submodule using the remote URL that you originally cloned it from - which is a local path on the server and won't exist on your local machine.
Try cloning the submodule via SSH instead, so its remote URL will work on both the server and your local machine.
I have a project with git submodules. I do a checkout with git clone --recursive. When I do this, I get this error on the submodule:
$ cd submodule
$ git status
# Not currently on any branch.
$
What I would like to do is to have the submodule automatically put on the master branch, because I frequently work in the submodule. Is there any easy way to do this?
This is not an error. It just indicates that the submodule is in "detached head" mode.
The reason is that the superproject's git link points to a specific commit of the submodule and not a specific branch. So the recursive clone checks out that commit directly.
If you want to work on branch master of the submodule:
git checkout -t origin/master
I am using a new red hat os, with git version 1.7.6 (also tried 1.9.2). I also have a debian 6 machine with git 1.7.6. When I create a clone and populate a submodule on the debian machine, the submodule ends up with a .git directory. However, when I perform the same commands on the red hat machine, my submodule ends up with a file named .git, and a new directory under my root repo in .git, named modules. This modules directory appears to contain the contents I would expect to be in .git under the submodule. What is going on???
Yes, it did change in git 1.7.8, to make checking out commits across the introduction of submodules easier.
See https://raw.github.com/gitster/git/master/Documentation/RelNotes/1.7.8.txt near the end of the Updates, above the fixes.