GIT pull conflict: how come not on any branch? -
i have branch checked out , edit , commited file. in meanwhile, else pushed changed same file.
when git pull, see
first, rewinding head replay work on top of it... applying: add new line applying: create 1 conf using index info reconstruct base tree... falling patching base , 3-way merge... auto-merging <filename> conflict (add/add): merge conflict in <filename> recorded preimage '<filename>' failed merge in changes. patch failed @ 0002 create 1 conf when have resolved problem run "git rebase --continue". if prefer skip patch, instead run "git rebase --skip". restore original branch , stop rebasing run "git rebase --abort".
i tried manually resolve conflict in file, see not on branch. wondering why happening.
git status # not on branch. # untracked files:
this normal. need fix file , follow rebase
instructions - --continue
.
you resolve issue by
- edit files resolve conflict
- perform
git checkout --ours -- <filenames>
if know version good - perform
git checkout --theirs -- <filenames>
if theirs good.
follow of these git add <filenames>
. note --ours
, --theirs
can swapped in cases might expect; check file checked-out if use options 2 or 3.
conclude git rebase --continue
(which commit you). if decide abort sure use git rebase --abort
git can out of 'not on branch' condition.
Comments
Post a Comment