對于以下 Git 日志,我如何修剪(完全洗掉)附加在 15acb99 并以存盤結束的分支。它不再需要。
$ git log --oneline --graph --decorate --all
* bc03ce7 (HEAD -> main) Implemented basic Auth0 functionality
* 38ed987 updated Readme
* 441f915 Addded graphql-codegen and embelished query org_unit
* c724f4a added Apollo Rover
* 6efbd90 Merge branch 'codegen'
|\
| * fc891c1 correct .gitignore to ignore node_modules
* | 128a914 removed pnpm
|/
| * f187ecb (refs/stash) WIP on auth0: 7fb18d9 Login/Out button implmented on Home page
| |\
| | * de4b497 index on auth0: 7fb18d9 Login/Out button implmented on Home page
| |/
| * 7fb18d9 Login/Out button implmented on Home page
| * 32e5959 Auth0 added and working - log in and display profile, basic protection of routes
|/
* 15acb99 added apollo packages and first query, add /clubs route to display OrgUnits
* 56c88ea Added Vue Router to Frontend
* 8e5bb96 Frontend initiated
* 769e86d Initial seed data added
* 592c8ac create tables OrgUnit and Person
* 3563cf3 init hasura migrations and metadata
* 93a20c7 init
我害怕把這件事搞砸。
uj5u.com熱心網友回復:
正如你所說的,它只是一個藏匿處。簡單地說
git stash clear
并且不需要的提交(并且沒有其他提交)都將從圖中消失。
uj5u.com熱心網友回復:
在這種情況下,您最好的選擇是互動式變基。但是合并提交會使這個程序比平時更難一些。
git rebase -i 15acb99
命令末尾的提交指示從哪里開始重寫歷史記錄。
這將彈出一個編輯器,其中包含 15acb99 和歷史中最后一次提交之間的提交串列。
您可以標記要保留的提交k,然后壓縮要保留內容的提交,s 但將更改與下一個提交結合起來。
據我所知,你想壁球6efbd90。
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/419720.html
標籤:
上一篇:如何在apacheTomcat8中禁用檔案上傳權限和目錄索引
下一篇:單個拉取請求中的多個提交
