Sample Header Ad - 728x90

Git - how to add/link subfolders into one git-repository directory

1 vote
1 answer
2219 views
Assuming I have a file structure like this: ├── Project-1/ │   ├── files/ │   └── special-files/ ├── Project-2/ │   ├── files/ │   └── special-files/ └── Project-3/ ├── files/ └── special-files/ Now I want to create a Git repository, including all the special-files folders. If it was files, I could create a hardlink ln ./Project-1/special-files ./Git-Project/special-files-1 and so on, so I would get: Git-Project/ ├── .git ├── .gitignore ├── special-files-1/ ├── special-files-2/ └── special-files-3/ Though hardlinks do not work with folders. Symlinks do not get handled by git. **Is there a way to achieve, collecting/linking these folders into a git repository-folder?**
Asked by nath (6094 rep)
Aug 5, 2021, 04:48 PM
Last activity: Jul 7, 2025, 01:01 PM