2

Here is my problem: I used to push into github.com several folders, but two of them was empty. When i try git status, it shows me

On branch master
Changes not staged for commit:
< use "git add<file>..." to update what will be commited>
< use "git --chackout<file>..." to discard changes in working derictory>
< commit or discard the untracked or modified content in submodules>

modified:app/model (modified content)
modified: app/show (modified content)
no changes added to commit (use "git add" and/or "git commit -a")

My local folders are not empty, just in remote. How can i add files from these folders into remote repo?

p.s. i tried git add -A ., git add -u, git add ., git submodule --recursive git add -A ., git submodule --recursive git commit -a -m "Initial commit" but it doesn't help.

Thanks for any help!

Deduplicator
  • 44,692
  • 7
  • 66
  • 118
nimblegirl
  • 21
  • 3

2 Answers2

1

Start git gui and click files to stage. Or use the 'Stage changed' button.

Balog Pal
  • 16,195
  • 2
  • 23
  • 37
1

I can't quite make out what you're trying to say. Are the folders still empty, or is there content in them now?

Git doesn't track folders, it only tracks files. So you can't add an empty folder into the Git repo, if that's what you're trying to do. If you really want the directory there, the standard practice is to add an empty .gitkeep file into it, so that Git has some content to track there. Then you would git add foldername and commit it.

John Szakmeister
  • 44,691
  • 9
  • 89
  • 79