Git merge --squash loses all changes if conflicts occur
I'm having a very weird problem with git, which I have not seen previously. I'm trying to do
git merge --squash feature-branch, but there's a non-conflict in one of the files (there's no actual conflicting lines, but git still claims there's a conflict to resolve).
Previously, I'd just resolve the non-conflict and commit, and the squashed changes would appear in master. But now, the conflict is reported, but none of the other changes come through. Here's what I mean:
$ git merge --squash feature
CONFLICT (content): Merge conflict in .htaccess
Squash commit -- not updating HEAD
Automatic merge failed; fix conflicts and then commit the result.
$ git status
# On branch master
# Unmerged paths:
# (use "git reset HEAD <file>..." to unstage)
# (use "git add <file>..." to mark resolution)
# both modified: .htaccess
no changes added to commit (use "git add" and/or "git commit -a")
The .htaccess file has a non-conflict, but there should be hundreds of other successfully merged files in the git status output. Instead, it's just the .htaccess file.
What the heck is going on? I've done this kind of thing a half a dozen times in the past (I use
--squash because I do not want the history from the feature branch to appear in master), and it's always worked fine.
We are working on a major revision to our website. All of the work on the revised site is being done in a git branch (call it 2.0), which branched off from master some time ago. Along the way, some ch
Is it possible to change commit messages using git rebase, but without having to re-resolve merge conflicts? I need to bowdlerize an older repo and I don't want to change any of the actual code, just
I have a git repository with Android kernel v3.0.36. But now, Linux 3.0.38 is out. Android and mainline Linux are incompatible, so I just want to pull the changes from 3.0.37 and 3.0.38 (just a small
I am a GIT newbie so I have some basic questions about git commands, merging, etc. I just did some changes to code, I did a git commit, and then I tried to do the following command : git push origin t
I'm a newbie to git, and got a little ahead of myself in creating/deleting branches and wanted to figure out the right process. Basically, I started on a new branch (branch_a) and then made a few chan
Octopus merge means to merge more than 2 heads. How should the user to compare files using ordinal 3-way merge tools? 3 files are passed to the merge tool: BASE, LOCAL, REMOTE How many and what combin
I have the following scenario: I have some staged changes and I have 3 commits ahead of master. I want the staged changes to be apart of the oldest commit of the three. There are a couple ways I know
I have just done a git merge --squash feature-branch into my develop branch. The problem is that the above command updated the head without creating a new commit. My intention was to create one singl
I tried git pull from master branch to fetch the changes Then i get this error CONFLICT (content): Merge conflict in src/scripts/core.js Automatic merge failed; fix conflicts and then commit the resul
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
Developer A is working on branch 2012A I branch 2012A, and create branch 2012B I want all the new changes from 2012A, so I simply want to merge them into 2012B and carry on working. Does this look ok
I've merged two branches. Got lot's of conflicts. Resolved them all. Now I'm not sure, maybe I've made an error during conflict resolution. And I don't see no another way to check is it true — just ru
how can i preserve original commiter, when i merging changes made by another developer? (Something like git merge --preserve-comitter) cherry-pick is almost good, but it seems does not preserve inform
I'd like to merge my feature-branch into my develop-branch, but squash some commits into 1, while pulling in others as-is. Is there a possibilty to git merge --squash feature and then to choose which
We're using Git 184.108.40.206. Given multiple branches with names BRANCH_1, BRANCH_2, ... BRANCH_N, is there a programmatic/scriptable way to tell what conflicts will exist if we want to merge all of these?
Imagine, I have several branches: master, a, b, c ... Now I'm in master branch and git pull. This fetches all changes from remote server into origin/master, origin/a, origin/b ... branches and merge
I want to be able to run my tests for my project with the current state of the index, ignoring non-committed working changes (I later plan to add this to a pre-commit hook). However, I am having troub
I committed my code and when I do a git pull I found some conflicts. How do I solve the conflicts and only get the file version from pulling without my committed changes?
I merged a tree onto a my repository by using git subtree add without the squash option. A git log shows that the commits were successfully added to the repository. However, if I do a git log --follow
So, the dev workflow for our project is like this: we create a task/bug ticket, and we branch off master to work on the task/bug, and eventually merge it back to master. We would like the commits on m
I've done merge some-branch into master, but gets confilcts. How to undo this ? git checkout master git merge some-branch ... CONFLICTS :(
As stated in the description. I would like to not even be prompted to resolve merge conflicts when they were automatically resolved. My Scenario is that I add a line containing a fixed text string to
I am trying to merge 2 commits into 1, so I followed “squashing commits with rebase” from git ready. I ran git rebase --interactive HEAD~2 In the resulting editor, I change pick to squash and then sa
I want to remove an in-between merge (remove, not squash) and then move the last 2 commits to a new branch. This is my current git log --graph: * 3a5c453 - (2 hours ago) last commit (HEAD, master) * b
I was advised to commit all my changes before running git pull and merge. Does it make sense ? What if I run pull and merge before committing my changes and commit them after the merge?
I am attempting a pretty beefy git merge maneuver right now. One problem that I am coming across is that I made some changes to some code in my branch, but my colleague moved that code to a new file i
I like to resolve merge conflicts on the command line, because that way I know exactly what I am doing. This is great for pretty simple merges, but if things get messy, it takes a long time. Are there
According to the documentation on git, a git pull will perform a fetch of the current branch and then run a git merge to merge the changes. After a colleague committed and pushed his changes to the se
I need to resolve conflicts in git, but as a novice, not sure what is the most effective way. This is my situation: I'm in master and need to commit and push all my changes. $ git pull: error: Your
This is the sequence of events : commiting changes git pull resolve conflicts (which makes all the files to change status to modified again) commit amend all files (so I'll have 1 final commit) git p
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'
This question already has an answer here: Combine the first two commits of a Git repository? 7 answers My repo has a huge number of commits and I would like to squash everything up until the la
I'm fairly new to Git, and have been working with it for only 3 months. We previously migrated our repositories from SVN. I'd like to be able to merge changes from the master into my dev branch withou
So, yesterday I posted a question regarding some weird conflicts when I tried to rebase an upstream branch into my local topic branch. In the end I used git rebase --merge upstream and solved a lot of
I'm trying to squash some commits from a branch I'm tracking from a github repository (and also in my internal gitolite server). My problem is that I'm rebasing as explained at http://www.git-scm.com/
For personal projects I use Git for SCM, but at work we use TFS. One thing that I like about Git is that it allows a person to easily squash all the changes made in a branch when pulling the changes b
I have a big merge going on with over 300 conflicting files. I want to resolve these using mergetool, but there's no way I'm going to finish it all in one sitting. How can I commit the merge and then
So I had a load of changes and some untracked files. I needed to tweak something, so I used git stash -u, modified a couple of things, committed those changes, pushed them, and then tried to git stash
I am a newbie using Tortoise Git ONLY to commit/revert and GitBASH to pull and push. (I face some ssh issues to commit using GitBASH and my question is not about it). I've two parts to my question. I
we are working on a project where we often get the same conflict due to git not able to merge the files correctly. However these conflicts can be easily fixed with an external script. Is it somehow po
So one of my coworkers accidentally made a merge that actually only kept one side of the tree. So he started a merge, deleted all the changes introduced by the merge, and then committed the merge. Her
I have a dev branch that hasn't been touched for a while. I merged the trunk into it to integrate many fixes/changes in the main line since it was branched out, but now I have many small conflicts (me
I'm trying to merge 2 branches that have a lot of changes in them, several with merge conflicts. I merged the files using git mergetool, but I've subsequently realized that I merged a couple of them i
In git I did git rm -r . This was stupid, because apparently it deleted all of my files in my working directory. Many of these files had changes that had not been commited. I was being stupid and did
how do I open from terminal window only files with conflicts during git/mercurial merge in textmate/sublime text2 editors
Hi I have solved some merge conflicts, committed then tried to Push my changes and received the following error: c:\Program Files (x86)\Git\bin\git.exe push --recurse-submodules=check origin master:
Assuming I have a parent stream and a child stream. There are no other active streams. If I rebase child stream to parents' recommended baseline, resolve all conflicts and then deliver from the child
For some reason, it looks like git cherry-pick pulls in other commits when flies have merge conflicts. These go away when we use git mergetool but prevent us from manually editing the merge-conflicted
I'm using Git-Svn to interact with a Svn repository at work and I can't seem to find a way to effectively resolve conflicts for the life of me. I've read the other questions on this topic, but evident
i'm looking for a console UI tool for resolving merge conflicts in git... like vimdiff but 'easier'