Bi-Directional GIT
-
Odd one, I have a customer that wants to have their entire setup backed up to GIT. The complication is that we deploy using GIT (from a third party source.) What's a good way to handle that?
I was thinking that I make my own GIT a level above the other one? I've never tried to do this before in this way. What happens when they overlap?
-
@scottalanmiller said in Bi-Directional GIT:
Odd one, I have a customer that wants to have their entire setup backed up to GIT. The complication is that we deploy using GIT (from a third party source.) What's a good way to handle that?
I was thinking that I make my own GIT a level above the other one? I've never tried to do this before in this way. What happens when they overlap?
You put the subfolder in the
.gitignore
for the higher level with a.gitkeep
in it.Then
git init
the sub folder.i suspect it has all kinds of issues though.
-
Thanks, I'll give it a try.
-
@scottalanmiller said in Bi-Directional GIT:
Thanks, I'll give it a try.
I think the "proper" way is sub modules or something like that. I looked into this once a while ago when designing a
git
structure for one of our web service projects. -
@JaredBusch said in Bi-Directional GIT:
@scottalanmiller said in Bi-Directional GIT:
Odd one, I have a customer that wants to have their entire setup backed up to GIT. The complication is that we deploy using GIT (from a third party source.) What's a good way to handle that?
I was thinking that I make my own GIT a level above the other one? I've never tried to do this before in this way. What happens when they overlap?
You put the subfolder in the
.gitignore
for the higher level with a.gitkeep
in it.Then
git init
the sub folder.i suspect it has all kinds of issues though.
Would you use the .git/info/exclude file for folder exclusion instead?
-
@dbeato said in Bi-Directional GIT:
@JaredBusch said in Bi-Directional GIT:
@scottalanmiller said in Bi-Directional GIT:
Odd one, I have a customer that wants to have their entire setup backed up to GIT. The complication is that we deploy using GIT (from a third party source.) What's a good way to handle that?
I was thinking that I make my own GIT a level above the other one? I've never tried to do this before in this way. What happens when they overlap?
You put the subfolder in the
.gitignore
for the higher level with a.gitkeep
in it.Then
git init
the sub folder.i suspect it has all kinds of issues though.
Would you use the .git/info/exclude file for folder exclusion instead?
Generally no, because that is not part of the repository while
.gitingore
and.gitkeep
are. That said in this case, it might be the better choice. -
@JaredBusch said in Bi-Directional GIT:
@scottalanmiller said in Bi-Directional GIT:
Thanks, I'll give it a try.
I think the "proper" way is sub modules or something like that. I looked into this once a while ago when designing a
git
structure for one of our web service projects.Depends what you want. If you just want the remote repo then use a subtree. If you want a specific commit from another repo then use a submodule.