Why can’t you merge in a bare git repo? -
why can’t merge
bare repo? bare repos don’t have head
or working tree. in config file can see bare=true
.
you can’t pull
in bare repo (because pull = fetch & merge , merge doesn't work). however, can push bare repo – why? far know, push
contains merge, in case can well.
so, question “how git merge work?”. why need head
? doing when merging?
as chronial points out, pushing fast-forward merges or forced updates, moves references/branch pointers different commit.
in actual non-fast-forward merge, need working copy in case conflicts need resolve. it's been mentioned before other stack overflow users; example, see this answer (emphasis mine):
git performs merge-y operations (real merges, cherry-picks, rebases, patch application) on work tree. mentioned several times before, example in 1 of knowledgeable jakub narębski's answers:
there no way merge (or rebase) can work without touching working directory (and index), there can merge conflicts have resolved using working directory (and/or index).
Comments
Post a Comment