![]() ![]() We add the file and try to continue our rebase. We resolve the conflict by selecting the master content of version.txt. $ git checkout v4ĬONFLICT (content): Merge conflict in version.txt It fails with a conflit in version.txt as planned. Switch back to v4 branch and try to rebase. Go back to master and change the content of version.txt so that there will be a conflit during the rebase. $ git checkout -b v4ġ files changed, 1 insertions(+), 1 deletions(-) $ echo v1.4-alpha-02 > version.txtġ files changed, 1 insertions(+), 0 deletions(-)Ĭreate the v4 branch and change the content of version.txt. ![]() Then commit the original content of version.txt in master. Initialized empty Git repository in $HOME/failing-merge/.git/ You can reproduce this problem in a test repository. I was able to solve my problem by skipping the corresponding commit ( git rebase -skip). My problem was caused because one of my commit only changed a file, and when resolving, I discarded the change introduced in this commit. I encountered a similar problem with a rebase. I changed the file as you suggested and get the same error: > git rebase master What's going on here? What am I doing wrong? Can anyone set me straight? It's at this point, after going round and round with this, that I'm banging my head off the desk. No changes - did you forget to use 'git add'? So, I try to continue: > git rebase -continue So, I was trying to add the file: git add app/views/common/version.txt Nothing to commit (working directory clean) So, I tidy it up and it looks like this now: v1.4-alpha-02Īnd then I tried to carry on: at first I try a commit: > git commit -a -m "merged" The version.txt now looks like this: > new version, new branch:app/views/common/version.txt To restore the original branch and stop rebasing run "git rebase -abort". If you would prefer to skip this patch, instead run "git rebase -skip". When you have resolved this problem run "git rebase -continue". Patch failed at 0001 new version, new branch ![]() Using index info to reconstruct a base tree.įalling back to patching base and 3-way merge.Īuto-merging app/views/common/version.txtĬONFLICT (content): Merge conflict in app/views/common/version.txt Here's what I'm doing: > git rebase masterįirst, rewinding head to replay your work on top of it.Įrror: patch failed: app/views/common/version.txt:1Įrror: app/views/common/version.txt: patch does not apply This file is app/views/common/version.txt, which before rebasing contains this text: v1.4-alpha-02 So, in v4, I tried to do a rebase from master, and one file keeps screwing things up: a one-line text file, that contains the version number. There were a couple of changes to master, that I want to get into v4. I have a git branch (called v4), that was made from master just yesterday. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |