There is a local folder , Used to write various hand training projects . Several subfolders inside are direct
Come here , But I changed something on it . Other subfolders are messy items written by themselves .
The parent folder is now
, I want to put the whole big folder
Backup to private library . Every subfolder can be found push success , however clone Incoming subfolders push It's empty .
Now except for each subfolder
rm -rf ./git
Is there a better way ?
Why are you here git Directory subfolder again git What about the project ? Isn't the usage right
perhaps You need to understand and learn git submodule
push It should be his origin You use git remote -v Check his origin
It may correspond to you clone The address of ～ therefore push Will be empty when ～
See this brochure for details , Make many concepts more thorough
As for the solution ～ It should be necessary Every time you clone Okay, then git init once stay git remote add ＋ Your remote private library This should be correct push
Because you didn't add the contents of the subfolder to the version management of the parent folder . For example, you have two warehouses A and B. When you are A When using commands in the directory, the operation is A Warehouse , stay B Directory git The command operates B Warehouse .
│ └── .git
│ ├── branches
│ ├── hooks
│ ├── info
│ ├── objects
│ │ ├── info