Unable to track files in long PATH using Git

Git says to use

git add 

to add unprotected files to my repo.

I ran unsuccessfully

 git add shells/zsh/keyboard_configs/ git add shells/zsh/references/ git add shells/zsh/keyboard_configs/* git add shells/zsh/references/* git add shells/zsh/keyboard_configs/*<TAB> git add shells/zsh/references/*<TAB> git add . 

I still understand that files are not being tracked when I see it in

 git status 

How can you git-add files on long PATH?




I ran

 $git status ~/bin # On branch master # Untracked files: # (use "git add <file>..." to include in what will be committed) # # shells/zsh/keyboard_configs/ # shells/zsh/references/ nothing added to commit but untracked files present (use "git add" to track) $git add shells/zsh/keyboard_configs ~/bin $git add shells/zsh/references ~/bin 

The following is what is unexpected. I expected that I would add tracking folders and their contents too.

 $git status ~/bin # On branch master # Untracked files: # (use "git add <file>..." to include in what will be committed) # # shells/zsh/keyboard_configs/ # shells/zsh/references/ nothing added to commit but untracked files present (use "git add" to track) $ 
-one
git add
Jul 04 '09 at 0:09
source share
2 answers

Are these directories empty? If so, Git does not track empty directories.

If you really need to add these directories to your repository, try adding an empty ".gitignore" file in each of them.

For some reference information about this design decision, see this thread from the Git address list.

+5
Jul 04 '09 at 0:57
source share

Maybe the files in these folders are somehow ignored? Check the .gitignore and .git / info / exclude files.

+2
Jul 04 '09 at 0:51
source share



All Articles