How to add folders and subfolders in existing project in Git

plugin

#1

hello,

How to add multiple folders in GIT.

something like this,

I have git repo as below

projectFolder

–> .git

–> folder1

 -->subfolder1 --> files

–>folder2

--> subfolder2 

      subfolder21 --> files(1--n)

and I want add multiple new folders

–> .git

–> folder1

 -->subfolder1 --> files

–>folder2

--> subfolder2 

      subfolder21 --> files(1--n)

–>newfolder1

** -->newSubFolder1 --> files(1…N)**

–>newFolder2

** -->newSubFolder2**

** -->newSubFolder21 --> files(1…N)**

The ones shaded in bold italics are similar folder structure need to be added it will have multiple folders with multiple files in it.

When I copy the folder the ‘git status’ doesn’t show any new folders added. git add -A doesn’t help.

Please let me how to add folders and subfolders with files within it.

Thanks,
Naveen


#2

What you do looks alright to me… what is in your .gitignore?


#3

You can find Git resources here: https://www.git-tower.com/learn/


#4

There is no .gitignore file.


#5

Are there already files in the folders you’ld like to add?

Git works on files only, not on directories!


#6

Yes, there are files in sub-folders that need to be added. There are sub-folders within multiple folders, that need to be added. And all folders will have files or folders inside it.


#7

Somehow this structure doesn’t look like a Kirby project at all?


#8

Thanks Bart and Sonja for your prompt responses. This is a requirement to add the sub-folders and folders with files… without have .git files within this folders. I haven’t come across this kind of scenario anytime. So I am looking into the possibilities to know if this is possible and how it can be done.


#9

Ah yes. AFAIK only folders added by git submodule have a .git file in it.