Git Rebase策略不会被覆盖

时间:2017-07-31 20:16:36

标签: git

我正在尝试从开发分支到我的功能分支进行rebase。如前所述in this Stackoverflow post,我希望带有合并冲突的文件覆盖我的同样功能分支文件。

然而,我的行为有所不同。

  1. 为什么VDPGallery显示为将被覆盖的文件?如果我执行git merge developgit rebase develop

  2. ,则不会显示
  3. 为什么告诉我Please commit your changes or stash them before you merge. Aborting?这应该会自动覆盖冲突文件。此外,我的所有文件都在rebase之前被推送和提交。

    $ git rebase -s recursive -X theirs develop
    First, rewinding head to replay your work on top of it...
    error: Your local changes to the following files would be overwritten by merge
            MarketPlace.Web/Marketplace.WebUI/Scripts/components/VDPGallery
            MarketPlace.Web/Marketplace.WebUI/css/am/site.css
            MarketPlace.Web/Marketplace.WebUI/css/am/site_l.css
            MarketPlace.Web/Marketplace.WebUI/css/am/site_m.css
            MarketPlace.Web/Marketplace.WebUI/css/site.css
            MarketPlace.Web/Marketplace.WebUI/css/site_l.css
            MarketPlace.Web/Marketplace.WebUI/css/site_m.css
    
    Please commit your changes or stash them before you merge.
    
    
    Aborting
    
    Unknown exit code (128) from command: git-merge-recursive 8b499ab98b4f23ad30ab2d5bafd9695f8405f^ -- HEAD 8b499ab98b4f23ad30a3b8b2d5bafd9695f8405f
    

1 个答案:

答案 0 :(得分:1)

这是一个暗示:

First, rewinding head to replay your work on top of it

如果没有更多信息,很难说,但也许您已经在本地删除了这些文件,因为您上次修改了这些文件,并且该更改将被覆盖。