Dineshkumar
Dineshkumar

Reputation: 4245

Sharing Specific folder with Two Repositories in Git

Lets say I have a Repository 'Game' which contains a folder 'common', i want to share the common with another Repository 'Puzzle'. One constraint is that i dont want to share Game repository's 'custom' folder with Puzzle.

├── Game
│   ├── custom
│   ├── other-folder
│   └── rank
└── Puzzle
    ├── hints
    ├── puzzle-specific-folders
    └── rank

Upvotes: 1

Views: 51

Answers (1)

stzahi
stzahi

Reputation: 349

You can use symbolic link of 'common' (origin folder in 'games') in 'puzzle'. in this way, the 'Puzzle' repository will have only a link and the actual data will be part of 'Games' repository and 'Puzzle' will be always synced to 'Games'

ln -s /Puzzle/common /Games/common

Upvotes: 2

Related Questions