Re: unexpected git-cherry-pick conflict
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jun 13, 2007, 12:58 UTC
- Message-ID
- <Pine.LNX.4.64.0706131354250.4059@racer.site>
- In-Reply-To
- <20070613091624.26463.qmail@353090644b4917.315fe32.mid.smarden.org>
Hi,
On Wed, 13 Jun 2007, Gerrit Pape wrote:
Show 11 quoted lines
> $ mkdir repo && cd repo > $ git init > Initialized empty Git repository in .git/ > $ echo foo >file > $ ln -s dangling link > $ git add . > $ git commit -mfoo > Created initial commit c6a9189: foo > 2 files changed, 2 insertions(+), 0 deletions(-) > create mode 100644 file > create mode 120000 link
So, basically your master has a file and a symbolic link.
Show 8 quoted lines
> $ git checkout -b branch > Switched to a new branch "branch" > $ git rm link > rm 'link' > $ git commit -mremovelink > Created commit 2c60f15: removelink > 1 files changed, 0 insertions(+), 1 deletions(-) > delete mode 120000 link
Here, you remove the link from the branch.
Show 7 quoted lines
> $ mkdir link > $ echo bar >link/file > $ git add link > $ git commit -m adddir > Created commit d3b30b5: adddir > 1 files changed, 1 insertions(+), 0 deletions(-) > create mode 100644 link/file
Here you added a directory of the same name as the symbolic link has in master.
Show 5 quoted lines
> $ git checkout master > Switched to branch "master" > $ git cherry-pick 8ddc4d5 > CONFLICT (file/directory): There is a directory with name link in > 8ddc4d5... file. Added link as link~HEAD
Here you _still_ have the file in master. So that conflict is really expected, since a cherry-pick will only do a three-way merge.
I guess you want to use git-rebase instead.
Ciao, Dscho