簡體   English   中英

將本地合並到開發環境中的沖突

[英]Conflict merging local into develop environment

因此,因為我犯了一個小錯誤,所以我在將本地文件合並到我的開發環境中時遇到了沖突。

我正在 Wordpress 網站上進行維護。 我通過首先在本地環境中測試更新而不是將其推送到開發環境來做到這一點,但我不小心在開發環境中更新了幾個插件而沒有注意到。 當我注意到我切換到本地文件並在那里進行更新時,當我想將本地文件合並到開發環境中時,我在終端中收到此錯誤。

> * branch            develop    -> FETCH_HEAD
Updating f08f8fb..c72a8b7
error: The following untracked working tree files would be overwritten by merge:
    wp-content/plugins/redirection/api/api.php
    wp-content/plugins/redirection/redirection-capabilities.php
    wp-content/plugins/w3-total-cache/BrowserCache_Environment_Nginx.php
    wp-content/plugins/w3-total-cache/BrowserCache_Page_View_SectionSecurity.php
    wp-content/plugins/w3-total-cache/Cdn_Environment_Nginx.php
    wp-content/plugins/w3-total-cache/Extension_Amp_Page_View.php
    wp-content/plugins/w3-total-cache/Generic_Page_PurgeLog.php
    wp-content/plugins/w3-total-cache/Generic_Page_PurgeLog_View.php
    wp-content/plugins/w3-total-cache/LazyLoad_Mutator.php
    wp-content/plugins/w3-total-cache/LazyLoad_Mutator_Picture.php
    wp-content/plugins/w3-total-cache/LazyLoad_Mutator_Unmutable.php
    wp-content/plugins/w3-total-cache/ObjectCache_Page_View_PurgeLog.php
    wp-content/plugins/w3-total-cache/Util_DebugPurgeLog_Reader.php
    wp-content/plugins/wordfence/css/activity-report-widget.1579191227.css
    wp-content/plugins/wordfence/css/diff.1579191227.css
    wp-content/plugins/wordfence/css/dt_table.1579191227.css
    wp-content/plugins/wordfence/css/fullLog.1579191227.css
    wp-content/plugins/wordfence/css/iptraf.1579191227.css
    wp-content/plugins/wordfence/css/jquery-ui-timepicker-addon.1579191227.css
    wp-content/plugins/wordfence/css/jquery-ui.min.1579191227.css
    wp-content/plugins/wordfence/css/jquery-ui.structure.min.1579191227.css
    wp-content/plugins/wordfence/css/jquery-ui.theme.min.1579191227.css
    wp-content/plugins/wordfence/css/main.1579191227.css
    wp-content/plugins/wordfence/css/phpinfo.1579191227.css
    wp-content/plugins/wordfence/css/wf-adminbar.1579191227.css
    wp-content/plugins/wordfence/css/wf-colorbox.1579191227.css
    wp-content/plugins/wordfence/css/wf-font-awesome.1579191227.css
    wp-content/plugins/wordfence/css/wf-global.1579191227.css
    wp-content/plugins/wordfence/css/wf-ionicons.1579191227.css
    wp-content/plugins/wordfence/css/wf-onboarding.1579191227.css
    wp-content/plugins/wordfence/css/wf-roboto-font.1579191227.css
    wp-content/plugins/wordfence/css/wfselect2.min.1579191227.css
    wp-content/plugins/wordfence/css/wordfenceBox.1579191227.css
    wp-content/plugins/wordfence/js/Chart.bundle.min.1579191227.js
    wp-content/plugins/wordfence/js/admin.1579191227.js
    wp-content/plugins/wordfence/js/admin.ajaxWatcher.1579191227.js
    wp-content/plugins/wordfence/js/admin.liveTraffic.1579191227.js
    wp-content/plugins/wordfence/js/date.1579191227.js
    wp-content/plugins/wordfence/js/jquery-ui-timepicker-addon.1579191227.js
    wp-content/plugins/wordfence/js/jquery.colorbox-min.1579191227.js
    wp-content/plugins/wordfence/js/jquery.colorbox.1579191227.js
    wp-content/plugins/wordfence/js/jquery.dataTables.min.1579191227.js
    wp-content/plugins/wordfence/js/jquery.qrcode.min.1579191227.js
    wp-content/plugins/wordfence/js/jquery.tmpl.min.1579191227.js
    wp-content/plugins/wordfence/js/jquery.tools.min.1579191227.js
    wp-content/plugins/wordfence/js/knockout-3.3.0.1579191227.js
    wp-content/plugins/wordfence/js/wfdashboard.1579191227.js
    wp-content/plugins/wordfence/js/wfdropdown.1579191227.js
    wp-content/plugins/wordfence/js/wfglobal.1579191227.js
    wp-content/plugins/wordfence/js/wfpopover.1579191227.js
    wp-content/plugins/wordfence/js/wfselect2.min.1579191227.js
    wp-content/plugins/wordfence/modules/login-security/css/admin-global.1579191227.css
    wp-content/plugins/wordfence/modules/login-security/css/admin.1579191227.css
    wp-content/plugins/wordfence/modules/login-security/css/colorbox.1579191227.css
    wp-content/plugins/wordfence/modules/login-security/css/font-awesome.1579191227.css
    wp-content/plugins/wordfence/modules/login-security/css/ionicons.1579191227.css
    wp-content/plugins/wordfence/modules/login-security/css/jquery-ui-timepicker-addon.1579191227.css
    wp-content/plugins/wordfence/modules/login-security/css/jquery-ui.min.1579191227.css
    wp-content/plugins/wordfence/modules/login-security/css/jquery-ui.structure.min.1579191227.css
    wp-content/plugins/wordfence/modules/login-security/css/jquery-ui.theme.min.1579191227.css
    wp-content/plugins/wordfence/modules/login-secu
Aborting

您有未跟蹤的文件,您的傳入本地分支正在嘗試寫入這些文件。 因為當您嘗試覆蓋文件時,舊文件將在覆蓋后永久消失,而 git 非常擅長檢測這些沖突並努力警告您以防止任何數據丟失。

如果你真的是“偶然”的意思,那么用你的本地分支覆蓋它們應該是可以的。 在開發環境中,您可以首先放棄您所做的任何更改

git ls-files --others --exclude-standard | xargs rm -rf

這將刪除所有未跟蹤的文件。 然后您可以再次合並您的本地分支。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM