日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Githug第42关rebase_onto通关秘籍

發(fā)布時間:2024/7/5 编程问答 35 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Githug第42关rebase_onto通关秘籍 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

Githug是一個用來了解、熟悉Git的一個非常好的游戲。

目前網(wǎng)站上收錄的都是之前只有55關(guān)的解題方法,沒有新增的rebase_onto這一關(guān)的內(nèi)容。現(xiàn)在Githug一共有56關(guān)。現(xiàn)將新增的42關(guān)的解答內(nèi)容更新如下:

第42關(guān)的題目如下:

Name: rebase_onto Level: 41 Difficulty: **You have created your branch from `wrong_branch` and already made some commits, and you realise that you needed to create your branch from `master`. Rebase your commits onto `master` branch so that you don't have `wrong_branch` commits.

通過查找,在git rebase中有以下用法:

Here is how you would transplant a topic branch based on one branch to another, to pretend that you forked the topicbranch from the latter branch, using rebase --onto.First let's assume your topic is based on branch next. For example, a feature developed in topic depends on somefunctionality which is found in next.o---o---o---o---o master\o---o---o---o---o next\o---o---o topicWe want to make topic forked from branch master; for example, because the functionality on which topic depends wasmerged into the more stable master branch. We want our tree to look like this:o---o---o---o---o master| \| o'--o'--o' topic\o---o---o---o---o nextWe can get this using the following command:git rebase --onto master next topic

所以,第42關(guān)的通關(guān)方法如下:

git rebase --onto master wrong_branch readme-update

祝通關(guān)順利!

總結(jié)

以上是生活随笔為你收集整理的Githug第42关rebase_onto通关秘籍的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。