If I understand your question correctly:
You want to discard the batter-icons
branch. That's easy:
$ git branch -D batter-icons
You want to rebase ups-icons-support
on master~1
. So, do that:
$ git checkout ups-icons-support $ git rebase master~1
Now you have:
* ups-icons-support
master * |
\|
* master~1
If your goal it to replace the old master branch, you could:
$ git checkout master
$ git reset --hard ups-icons-support
You need to do two tasks:
You need the uppercase "d" because these commits are going to lose all references to get them.
git branch -D batter-icons
This is done with git rebase --onto
git checkout ups-icons-support
git rebase --onto master~1 HEAD~1 ups-icons-support
Thanks for answer, here is how I made it
git log --oneline --decorate --all --graph
* dd9bda6 (origin/batter-icons, batter-icons) на всякий * 16b9233 battery to primary * cb61d3a icons 1 | * 3824a5e (origin/ups-icons-support, ups-icons-support) XFCE-powemanager-UPS-icons | * 4c8ecae Reverted index.theme to original(as was after forking) |/ * 7ca1226 (HEAD, origin/master, origin/HEAD, master) 96 support * 66c295a folders and index for panel folder * c4ca2a7 1.3.1
* dd9bda6 (origin/batter-icons, batter-icons) на всякий * 16b9233 battery to primary * cb61d3a icons 1 | * 3824a5e (origin/ups-icons-support, ups-icons-support) XFCE-powemanager-UPS-icons | * 4c8ecae Reverted index.theme to original(as was after forking) |/ * 7ca1226 (HEAD, origin/master, origin/HEAD, master) 96 support * 66c295a folders and index for panel folder * c4ca2a7 1.3.1
git branch -D batter-icons
git branch -D --remote origin/batter-icons
git checkout ups-icons-support
git rebase --onto master~1 HEAD~1 ups-icons-support
git branch -D --remote origin/master origin/ups-icons-support
git rebase --onto master~2 HEAD~1 ups-icons-support
git log --oneline --decorate --all --graph
* c49c5e2 (ups-icons-support) XFCE-powemanager-UPS-icons | * 7ca1226 (HEAD, master) 96 support | * 66c295a folders and index for panel folder |/ * c4ca2a7 1.3.1
* c49c5e2 (ups-icons-support) XFCE-powemanager-UPS-icons | * 7ca1226 (HEAD, master) 96 support | * 66c295a folders and index for panel folder |/ * c4ca2a7 1.3.1
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.