Tag: merge

git pull always returns “not something we can merge”

No matter what repository I am in I get this response from git pull “merge: 012012012012012012012012012012012012012012012012012012012012012012012012012012012012012012012012 – not something we can merge“. I have tried uninstalling git and re-installing with no luck. git fetch origin and git merge origin/master work fine. I could very well use those commands instead of git pull but Homebrew uses […]

Is `git merge` able to display every change (w.r. to a common ancestor) as merge conflict?

Assume we have a file common_ancestor (master) ok ok ok ok ok From there, we change and commit master to ok change not ok (looking back) ok ok ok latest change ok Now we have a better idea, checkout common_ancestor and change it to ok ok ok This is a really good change ok ok […]

Git new file appears in all branches

I thought a file created on one branch will not appear in any other branches until I merge or rebase the branch? Example: I have two branches: master new_contact_page I checkout the new_contact_page branch. $ git checkout new_contact_page Then I create a new file. $ vi contact_page.html Without doing any Git commands, I switch back […]

Need help to understand merge conflict example

I am following an example from a book which does not show the step to resolve a merge conflict. The tutorial which teaches that did not work for me as mentioned in this post – Simulate multiple users/committer's on local system So, I could not even learn the merge. Here are the steps copied from […]

Understanging Conflicts Merging Algorithm

I look at a merge marker that looked all screwed up. To give you the situation lets have this: public void methodA() { prepare(); try { doSomething(); } catch(Exception e) { doSomethingElse(); } } Now comes in a merge (I use SourceTree for pull). And the marker looks like this: <<<<<<<<< HEAD try { doSomething(); […]

Git merge – Treat any auto file change as a conflict (do not stage), like a –squash

I am merging a large series of unwrapped tags from master into a topic branch and am using: git –no-commit –no-ff tagName^0 And it works as it should. Besides the actual hard file conflicts created, I need to review and hand edit a large number of files that have incorrect auto-merges due to needing a […]

How can I “splice” two (or more) completely unrelated linear branch ancestries into a new one?

I’m trying to combine two branches each with different root commit into a new, empty branch. This is not the usual merge thing as i don’t want to have the branches combined only in the last commit (in that case, the new branch would have a merge commit and ‘below’ still two seperate histories. The […]

How do I compress multiple merges into a single merge?

I have a topic branch that looks like this. (the branch topic currently points at ‘a0a0’) a0a0 Merge branch ‘Master’ into topic b1b1 Merge Branch ‘Master’ into topic c2c2 Merge commit ‘something from master’ into topic d3d3 Merge Branch ‘Master’ into topic e4e4 Merge Branch ‘Master’ into topic f5f5 Merge Branch ‘Master’ into topic 6666 […]

git: import changes from non git repository

Scenario: Local git repo, default master branch FTP server with content of the repo (non git), synchronized daily with the local repo, master branch Workflow: user1 is working on local git repo (git add, working directory clean) user2 (non git user) changed files directly on the FTP server How can I import all files changed […]

Git: How to maintain two branches of a project and merge only shared data?

Suppose I have two branches of a project IMClient-MacOS and IMClient-Windows, and their code only differs by (let’s say) one directory main/. All the other directories contain system-independent code and are interchangeable. Some workers work on the Windows version, and some work on the MacOS version. How do they prevent overwriting changing into the main/ […]

Git Baby is a git and github fan, let's start git clone.