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

Untracked files when git status executed on a new folder

From
VHVíctor Martín Hernández <vmartin@aliga.ieec.uab.es>
Date
Jun 23, 2015, 15:19 UTC
Message-ID
<1435072761.15867.38.camel@aliga.ieec.uab.es>

Hi all. Today I've had an unexpected behaviour that I'm not sure if is a bug or I'm not doing git best practices... (surely the latest...) The sequence of actions is :

1. create a new subfolder of my local repository branch
2. cd to this new folder, and create a new file
3. execute git status from the new folder
Doing that, the new folder doesn't appear as untracked.
4. cd ..
5. git status
In this case, the new folder appears.

If I create a new folder on the same level that the new one created in step 1, cd into it, and execute git status, the folder created in step 1 appears as untracked.

After step 3 I have executed git commit and git push to the remote, and later another user has realized that the new file was not present.

Please let me know if you understand my explanation, and if it's a bug or just that I'm not as experienced as I'd like with git ;)

THANKS!! Víctor

-- 
---
Víctor Martín Hernández

R&D Software Engineer
Instituto de Ciencias del Espacio (ICE/CSIC), and 
Institut d'Estudis Espacials de Catalunya (IEEC)

Campus UAB, Carrer de Can Magrans, s/n
08193  Bellaterra (Cerdanyola del Vallès) - Barcelona
Tel. : +34 93 586 8782
Web:   http://gwart.ice.cat/
Next: Johannes Löthberg
Message 1 of 3 in “Untracked files when git status executed on a new folder”
  1. Víctor Martín HernándezJun 23, 2015
  2. Johannes LöthbergJun 23, 2015
  3. Víctor Martín HernándezJun 24, 2015

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.