git pull merge conflicts from fully merged branch
This is not a duplicate of git pull from clean directory has merge conflicts - In that question the user was trying to pull from a remote which had commits which were not in the local branch. In my case there are NO commits on the remote which are not also in my local branch.
For starters, here's my git status:
asj@asj] git fetch
asj@asj] git status
# On branch project
# Your branch is ahead of 'origin/project' by 17 commits.
# (use "git push" to publish your local commits)
nothing to commit, working directory clean
As you can see I'm on my own project branch which is 17 commits ahead of origin/project. When I run git log as a diff it lists the 17 commits in project which aren't in origin/project:
asj@asj] git log project ^origin/project
<shows all 17 commits>
So far so good, now I check for commits in origin/project which are not yet in project:
asj@asj] git log origin/project ^project
As expected, there is nothing on the remote which is missing from my local project branch. The local branch is fully merged. Now I run git pull as a best practice before pushing my 17 commits. I expect this to tell me I'm already up to date:
asj@asj] git pull
First, rewinding head to replay your work on top of it...
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
CONFLICT (content): Merge conflict in SomeFile
Failed to merge in the changes.
Patch failed at 0001 SomeEarlierChange
The copy of the patch that failed is found in:
When you have resolved this problem, run "git rebase --continue".
If you prefer to skip this patch, run "git rebase --skip" instead.
To check out the original branch and stop rebasing, run "git rebase --abort".
This is not what I expected. When I play along and resolve the conflicts in SomeFile then git rebase --continue it comes up with more conflicts in more files. I've continued down this rabbit hole through a few iterations, but I didn't recognize any of the changes I was seeing or where they might be coming from. I've gone through the whole process a couple of times, and always end up running git rebase --abort and returning to the situation described at the beginning of this post.
I'd like to simply push the changes from those 17 new commits to the remote, since they're urgently needed for the project. However, I'm quite afraid that this would result in more mysterious conflicts and that I'd end up spending all day fixing the remote branch instead of my local one. I'd like to address the difficulties I'm having with pull before I get to push.
The only relevant thing I can think of is that some of the commits on the local branch were merged in from a third branch. Could these commits be conflicting with the history between project and origin/project? My fear is that git now thinks origin/project's history is new and different and needs to be merged into project when pulling (even though it contains no new commits). Might this be the case? How would I remedy this?
Any other ideas as to what could be going on here?
I've got a git repo with one branch, in addition to the master. I want to make that one branch the master -- overwriting the master completely. Obviously I could do a merge, but this will result in ma
i have my master branch and a develop branch for working on a few changes. i need to merge changes from master into develop, but will eventually merge everything from develop into master. which is the
Using git, I have some merge conflicts. I have tried using egit plugin for eclipse to color the diffs. After I resolve I see the obvious and can-be-resolved-without-me diffs were not resolved by egit.
Our development/release cycle works like this: Developer creates a feature branch, implements a feature Developer indicates feature is ready for acceptance testing (UAT) Tester deploys feature branch
I have master and feature-1 branch on my git. Now, I need to work on feature-2 branch which is dependent on feature-1. I can't merge feature-1 to master yet because of some dependency. So, I merged fe
I ran git pull origin and now I have some issues with merge my branch with a master. Here's what I did: commit all changes on my branch git checkout master git pull origin master git checkout my bran
Is there any way of preventing files with merge conflict from getting committed in git. No one is going to commit files with conflict intentionally, but is there a way to prevent files from getting co
A central git repository we use has two branches that diverged a long time ago. Someone accidentally merged the old branch into the newer one, causing some conflicts. Now I have a merge commit sitting
I am looking for a way to automate a merge from a Master branch to one or more development branches. In other words, I want to synchronise team development branches with Master daily across multiple p
I can't pop my stash because I merged a branch which apparently conflicts with my stash and now my stash is seemingly unable to be popped. app.coffee: needs merge unable to refresh index Anyone know
I hope this does not seem to obvious. I have two git repository. We decided to split one branch from the first repoistry into a git sub module. Now I have been using this sub module, however people ha
When I merge a branch in git to master I often get merge conflicts. Is there a way to merge a branch and just overwrite the stuff in the current branch? Thanks!
I have two branches in my local git repository, master and Logging. Both branches have remotes on BitBucket. master is the main branch of the project I'm currently working on. When other developers ha
I'm coming from a SVN background. I've forked and branched a git repository. Then I changed the branch (let's call it my-branch), committed, pushed and sent a Pull Request. It happens that the upstrea
We are a team working with git, we have a central repository (single origin) we use to push and pull from (and capistrano use it to deploy the branch master) we make commits and deploy regularly (10~2
For some reason, whenever I git pull to update my codebase, instead of it invoking the usual sort of pull from origin/master to master I'm prompted to specify commit history with all of the usual merg
git pull --rebase removes unpushed merge commits. Is there a way to make it preserve them? Say my history looks like— A | \ B H | | C G | | D F | / E (A being the merge commit.) After a git pull --re
I'm trying to do a merge and there's a bunch of conflicts. It's all generated files so what I want to do is basically say ignore all merge conflicts, and check everything in from my own repo. I've t
Our workflow is as follows: Create feature branch from trunk Do all development in feature branch While working in feature branch, regularly merge trunk into branch to stay in sync with trunk. Once f
I'm using Git Flow for my project, and have completed the git flow feature finish step that merged my feature branch into my develop branch. I then performed git push to GitHub, but on GitHub I still
In short, why does a file foo.txt having content a b failed to merge with the branch with foo.txt having content: a c ? The longer version is: to experiment with Git and merging, I did the following
Today I faced with one problem. My teammate created branch from master. He developed one feature in this branch and after that developed two subfeatures in subfeature's branches. At last he did two re
when I do a git pull origin master from a branch the branch is updated NOT the master. In order to update the master I need to do a git checkout master and then call git pull origin master. Why
My git repo looks like this: _ branch_a / master / \_ branch_b Now I want to merge branch_b into branch_a, not either branch into master. So, I did git checkout branch_a git merge branch_b And git
I tried to commit the changes. After a lot of problems and conflicts, I managed to resolved every problem. However, the code I committed is not currently on any branch (as the git status shows). How c
Assuming we have one trunk and one branch (COKE). (I run Git over SVN and merge from trunk to COKE with svn, not Git) There have been changes in FILE1 on trunk that we want in COKE branch. We merge f
I don't know if that's a common problem. Most of the times that we pull a CSS file from our development repo, GIT conflicts with the current file, entirely merging the two files by putting the >&g
I performed a merge of two branches, resolved the conflicts with mergetool, and confirmed that the all the files have been merged. So now all the files are staged for commit Trying to compile though,
A pull request comes into my repo hosted on Github. By default it is merged into the master branch. Is there any way for me to change which branch the changes would be merged into?
Currently I am working in a feature branch that will soon be merged back into master. I recently tried just that and had some merge conflicts, which I had to fix manually. So, is it possible to tell
In a merge with conflicts, is there a way to tell git to keep one version for a set of files? $ git checkout some_branch $ git merge origin/master $ ?
I have been building a feature on a branch (lets call it 'feature1') that I've merged into my master branch ('master') several times. Ive merged other feature branches into master intermittently, so m
If I have created and pushed a topic branch that has been merged to master long time ago, can I safely just run git push origin :foobranch without fearing that it somehow deletes data that is merged t
When I git pull from a branch that is not master, I get following response. You asked me to pull without telling me which branch you want to merge with, and 'branch.not_master.merge' in your configur
In our repository we develop features based on feature branches. Lately I integrated a feature feature/myfeature into master: git merge --no-ff feature/myfeature After this merge some more developmen
I created a branch without copying the files from trunk. Development is complete now and ready for the live release. I would like to merge from the Branch to trunk. ( trunk contains the existng code).
How do I pull master into the current branch I am working on, and see the conflicts? Also, should I merge or rebase, not sure which of the two is correct.
Using git bisect I found the culprit commit - it is a merge commit (I'm on the master branch) I'm trying to isolate the buggy code but the merge included some commits from the merged branch and I don'
I have created a fork from a project on GitHub. How can I now pull changes from the project that I forked from?
let's say I have the following config file [branch master] remote = origin merge = refs/heads/master [remote origin] url = ssh://origin.com fetch = +refs/heads/*:refs/remotes/origin/* [remote far
How can I merge/apply patch from one branch to other branch.Both branch has nearly same merge history from other branch .Ex : Branch 1 and branch 2 both has nearly same code merge from BranchX ,Branch
I'm working on a local branch and want to merge the latest remote master into this to get it up to date with other changes merged to master from a different branch. I'm new to git, but TortoiseGit is
When i do Team -> Pull on my project I have result Failed, then below merge input i have tow modification but none of them is impacting the same file, so there is no conflicts. Why is this showing
after checkout to the desired branch: git checkout feature/myBranch I want to pull the project contained in this branch to my local repository, how can i do that please.
I get conflicts on a merge between two local branches when only one has changed. Worse still, the conflict markers make no sense. This has happened twice now. Can someone tell me what is going on here
I made a branch and the first time I went to merge from the source to the branch there were a whole bunch of old changesets coming up that it says were not merged but they were present well before the
I have a branch checked out and I edit and commited a file. In the meanwhile, someone else pushed changed to the same file. When I do a git pull, I see First, rewinding head to replay your work on top
Currently, before merging a branch, I use the following commands to see what changes will be merged: base=$(git merge-base other HEAD) git diff $base other Is there a single git command to achieve th
I have two branches, master and dev. I always work on dev and only check code into the master branch once it's been approved for production use. When I do so, I have to do the following: git checkout
I'm working on a project and I see several merge commits from another developer. For some reason, he was merging an unfinished topic branch into our master branch on a daily basis. I want to see all t