Reputation: 7251
I have three branches:
master
dev
feature
My branch master
is up to date. I want to rebase my branch feature
with
master
git checkout feature
git rebase master
But at the beginning I see:
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 model widget desc + stats
is the first commit on this branch.
So the rebase is using the wrong version of my branch.
The result is a lot of conflits, and my file that I have committed is gone.
Exemple :
<<<<<<< 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
he want to rebase the head of the branch master with the wrong commit...(ajout model widget desc + stats)
I searched for a solution to rebase my branch with the lastest commit.
| * 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
:
Upvotes: 0
Views: 901
Reputation: 39961
It doesn't actually look wrong.
Your output is expected
feature
ajout...
In your case it gives conflicts. It's not unusual so you need to resolve them in the editor of your choice, then continue the rebase. In your current state the rest of the commits are still waiting to be applied, they are not missing.
git add <file name>
git rebase --continue
If it feels like havoc you can always abort the rebase with git rebase --abort
Upvotes: 4