git是否重新设置了错误的分支?
我有三个分支机构:git是否重新设置了错误的分支?,git,rebase,Git,Rebase,我有三个分支机构: master dev feature 我的分支master是最新的。我想用 master git checkout feature git rebase master 但一开始我看到: First, rewinding head to replay your work on top of it... Applying: ajout model widget desc + stats Using index info to reconstruct a base tree..
master
dev
feature
我的分支master
是最新的。我想用
master
git checkout feature
git rebase master
但一开始我看到:
First, rewinding head to replay your work on top of it...
Applying: ajout model widget desc + stats
Using index info to reconstruct a base tree...
ajout模型小部件desc+stats
是此分支上的第一个提交。
因此,rebase使用了错误的分支版本
结果是很多冲突,我提交的文件也不见了
例如:
<<<<<<< HEAD
$this->createWidget('samples/footer','content', array('channeltitle'=>$channelTitle));
=======
$this->createWidget('samples/desc','desc', array('channelTitle' => $channelTitle));
$this->createWidget('samples/statistics','statistics', array('channelTitle' => $channelTitle));
$this->createWidget('samples/footer','footer');
>>>>>>> ajout model widget desc + stats
事实上它看起来并没有错 您的输出是预期的
功能中倒带所有提交
ajout…
git add
git-rebase——继续
如果感觉像是一场大破坏,你可以用git rebase中止rebase--abort(中止)实际上看起来并没有什么问题 您的输出是预期的
功能中倒带所有提交
ajout…
git add
git-rebase——继续
如果感觉像是一场浩劫,你可以随时用
git-rebase--abort
中止rebase,你可以添加git-log--oneline--graph--decoration--all的输出吗?@Cupcake我编辑我的帖子你可以添加git-log--oneline--graph--decort--all
请?@Cupcake我编辑我的帖子如果我这样做的话git-rebase--continue
my file on branchfeature
被擦除,我拥有master
中的新文件夹……在执行之前--continue,git-status
告诉你什么?我的新分支中没有很多文件。最重要的是,当我想重新设置基础时,分支功能中的文件夹已不存在。他使用分支功能的“我的第一次提交”重新基址,而不是lastGit将从第一次提交开始按顺序重新基址所有提交。这是正常冲突。确定要保留的内容,并确保删除所有带有的行,因为它们是冲突发生位置的指示器。Git可以保留它们,但您的代码当然不会运行。然后运行git add
。执行此操作,直到“冲突中的文件”或类似部分下显示为git状态的所有文件消失。然后git-rebase——继续。接下来,它应该尝试应用“社交链接”,可能会导致更多冲突。如果我执行git-rebase--continue
我在分支上的文件功能
被擦除,并且我从master
获得了新文件夹……在执行之前--continue,git-status
告诉你什么?我的新分支中没有很多文件。最重要的是,当我想重新设置基础时,分支功能中的文件夹已不存在。他使用分支功能的“我的第一次提交”重新基址,而不是lastGit将从第一次提交开始按顺序重新基址所有提交。这是正常冲突。确定要保留的内容,并确保删除所有带有的行,因为它们是冲突发生位置的指示器。Git可以保留它们,但您的代码当然不会运行。然后运行git add
。执行此操作,直到“冲突中的文件”或类似部分下显示为git状态的所有文件消失。然后git-rebase——继续。接下来,它应该尝试应用“社会联系”,可能会引发更多冲突。
| * fac92fe (HEAD, origin/feature, feature) work better
| * a366488 works in AJAX !
| * f5d120e appel ajax dans la vue
| * c1f8360 ajout model ajax bestVide, FeaturedChannel (no cache active)
| * 211fda0 ajout widget network
| * 4d1c2a5 social link
| * c511472 ajout model widget desc + stats
|/
| * 2f8ddcc (origin/master, origin/HEAD, master) Merge branch 'dev'
| |\
|/ /
| * 0c859da dev Channel/Network + fix Artifice
|/
| * 41c0cfb (origin/update_channel, update_channel) update
| * 66015b6 ajout bannerimg
| * 1433e90 ajout entete script
| * 619d850 ajout dossiet script crontab
| * 8c4b2c8 channel inactive + simplification
| * 37c453c modif network
| * b764ddb fisrt version script update_channel
|/
* 5676028 Merge branch 'generalmodels'
|\
| * da10f84 Return JSON in utf8
| * 10f7897 good job bro
| * 3eadddc config grunt
: