mirror of
https://github.com/flancian/garden.git
synced 2026-08-07 23:16:21 +00:00
Auto saved by Logseq
This commit is contained in:
@@ -0,0 +1,11 @@
|
|||||||
|
- an [[error]].
|
||||||
|
- in [[git]]
|
||||||
|
- [[fatal]]
|
||||||
|
|
||||||
|
I get this a lot when trying to merge repositories with different histories -- which of course shouldn't happen often, but does happen to me when I'm trying to [[bootstrap]] a new repository.
|
||||||
|
|
||||||
|
Case in point: writing the README first when creating the repository in [[gitlab]] or [[github]] makes sense to me, as it's checking a checkbox and editing. And uploading a set of bootstrapping files then makes sense as a second step to me -- but that is ideally done right at the place files live, and once there it's easy to just say `git init`. But then if you want to merge the two you get into problems as [[git]] doesn't merge unrelated histories by default.
|
||||||
|
|
||||||
|
- #go https://stackoverflow.com/questions/39761024/refusing-to-merge-unrelated-histories-failure-while-pulling-to-recovered-repos/39783462#39783462
|
||||||
|
|
||||||
|
This [[stack overflow]] answer contains the flag you need: `--allow-unrelated-histories`.
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
- an [[error]].
|
||||||
|
- in [[git]]
|
||||||
|
- [[fatal]]
|
||||||
|
|
||||||
|
I get this a lot when trying to merge repositories with different histories -- which of course shouldn't happen often, but does happen to me when I'm trying to [[bootstrap]] a new repository.
|
||||||
|
|
||||||
|
Case in point: writing the README first when creating the repository in [[gitlab]] or [[github]] makes sense to me, as it's checking a checkbox and editing. And uploading a set of bootstrapping files then makes sense as a second step to me -- but that is ideally done right at the place files live, and once there it's easy to just say `git init`. But then if you want to merge the two you get into problems as [[git]] doesn't merge unrelated histories by default.
|
||||||
|
|
||||||
|
- #go https://stackoverflow.com/questions/39761024/refusing-to-merge-unrelated-histories-failure-while-pulling-to-recovered-repos/39783462#39783462
|
||||||
|
|
||||||
|
This [[stack overflow]] answer contains the flag you need: `--allow-unrelated-histories`. I guess [[git]] doesn't include it in the error message to prevent people from just tacking it on without knowing what they are doing (just to make the error go away) and having a mess as a result.
|
||||||
Reference in New Issue
Block a user