top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Is it any way to push empty directory under git? I need to push n number of empty directories to github?

0 votes
310 views
Is it any way to push empty directory under git? I need to push n number of empty directories to github?
posted Jun 15, 2016 by Amit Kumar Pandey

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+1 vote

I wanted to avoid push if any of the files is deleted from the local git clone area. Can anyone please help me with that?

I am using Stash for repository management.

0 votes

the gitignore rules work so that if a directory is ignored, all files in that directory are ignored. While that behavior isn't clearly documented in gitignore, this behavior is consistent across all git tools (status, ls-files, ...).

An exception is that listing the ignored files using "ls-files -i" doesn't behave the same way.

example:
$ mkdir d
$ touch d/f
$ echo /d/ > .gitignore
$ git ls-files -o --exclude-standard
.gitignore #d/f is correctly not listed
$ git ls-files -i --exclude-standard
#no output

d/f isn't listed even though it is treated as an ignored file by all other git tools. That seems inconsistent to me. Is that behavior intentionally or is this a bug?

A very similar question was asked before:
http://git.661346.n2.nabble.com/git-ls-files-ignored-and-ignored-directory-tt7570641.html
but without an answer.

+2 votes

I've been trying to figure out why I can't push from a shallow clone (using --depth) to a repository. I've made simple examples where it works, but I've read that in doesn't work in every case. However, I can't come up with a case where it doesn't work. Googling gives this answer: http://stackoverflow.com/questions/6900103/why-cant-i-push-from-a-shallow-clone,

but I don't completely understand the explanation,Please explain.

+1 vote

The use case:
"git submodule update" seems to be inefficient when running sequentially on a large .gitmodules file. Assuming a git forest with over 7K gits it takes hours to complete the update (running on Windows+Cygwin)

If not supported, this feature could be a good candidate for "git submodule" enhancement.
What is your opinion or advice?

...