git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Bug Report: "git submodule deinit" fails right after a clone

From
Heiko Voigt <hvoigt@hvoigt.net>
Date
Oct 5, 2016, 13:36 UTC
Message-ID
<20161005133650.GB30930@book.hvoigt.net>
In-Reply-To
<CAPOqYV+xsrLk7y1hJYHZFY8OfkxVRwPcZBdqhdgrhThqdZysQA@mail.gmail.com>
Hi,

please do not top-post the conversation will otherwise get hard to follow. Thank you.

On Tue, Oct 04, 2016 at 05:46:45PM +0200, Thomas Bétous wrote:
> Thank you for your answer and sorry for the delay (I was on vacation...).
> 
> I am using git 2.9.0.windows.1 (run on Windows 7 via git bash).

My initial reaction is that this might be a problem with line endings. Did you check whether you get any diff when you do a 'git diff' after the clone?

Maybe the variable 'core.autocrlf' is set to 'input' ? Have a look at 'git help config'

Show 12 quoted lines
> I tested it on this repo:
> https://github.com/githubtraining/example-dependency.git
> The same problem occurs.
> Here a small script to reproduce the error on my PC:
> #!/bin/bash
> git clone https://github.com/githubtraining/example-dependency.git
> cd example-dependency
> git submodule deinit js
> 
> It ends with this error:
> fatal: Please stage your changes to .gitmodules or stash them to proceed
> Submodule work tree 'js' contains local modifications; use '-f' to discard them
Here I get

$ git submodule deinit js Cleared directory 'js'

So all seems fine.
> Is the script working on your PC?
Yes. I am on Mac OS X though.
Cheers Heiko
Previous: Thomas BétousNext: Heiko Voigt
Message 4 of 6 in “Bug Report: "git submodule deinit" fails right after a clone”
  1. Thomas BétousAug 30, 2016
  2. Heiko VoigtSep 14, 2016
  3. Thomas BétousOct 4, 2016
  4. Heiko VoigtOct 5, 2016
  5. Heiko VoigtOct 6, 2016
  6. Thomas BétousOct 6, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.