git merging branches in a bare repository

前端 未结 3 1516
花落未央
花落未央 2021-02-19 13:53

I would like to create the following setup for my git repos:

I currently have a local git repo with all my working files. I would like to be able to setup a central bar

3条回答
  •  北恋
    北恋 (楼主)
    2021-02-19 14:14

    Note, this can actually be done on a bare repo, but you have to work around the normal interface.

    $ git read-tree -i -m branch1 branch2
    $ COMMIT=$(git commit-tree $(git write-tree) -p branch1 -p branch2 < commit message)
    $ git update-ref mergedbranch $COMMIT
    

提交回复
热议问题