Reputation: 113
Problem:
I have two repo's, one (repo A) contains scss files (folder named scss) that I would like to use in repo B.
In repo B I would like to add the scss folder as a subdirectory, and when I make a push to repo A, the scss folder should automatically pull in the contents and make a push.
Basically I need the folders to have the exactly the same contents at all times, Im presuming above is the only way to do so?
Tried:
Thought about git hooks for this but I'm under the impression that they're best used on a server, and currently they are two local repo's sitting on my computer.
Any suggestions greatly appreciated.
Upvotes: 1
Views: 2103
Reputation: 1943
A quick Google search came up with an interesting tool called GitHubSync that might help you synchronize specific files and folders across different Github repositories. It doesn't seem to work for other platforms so you will need to look for a different solution if you repositories are not hosted on Github.
Edit: Also take a look at this answer that talks about Git submodules that does exactly what you want to do using references, and the official Git documentation about submodules.
Upvotes: 1