Tag: git merge

Is there a way to give git metadata to mark a line as not being automatically mergeable?

In git, the default behavior is to automatically merge files if possible, and this makes sense in most cases, but here is an example where an original committer may know that automatic merging of a certain line in the file may be incorrect. For example, adding an entry somewhere in a list may not work […]

Git merge didn't merge two files only?

I have master branch, and a release branch. Last commit on the release branch added couple lines to files, let’s say, A and B. Then these changes were merged into master (things happen). Later, number of other commits were made to master, one of which removed those couple lines from A and B again. Now […]

git review is failing to push my changes

I am new to git. And as practice, i am working on 2 braches say program_1, program_2. git branch program_1 ls temp git branch program_2 # (create program_2 branch) git checkout program_2 git merge program_1 program_2 # (as i need temp folder in program_2) # Add some files in temp folder (say 1.c, 2.c) git […]

How to have Git ignore merge conflicts where the file was deleted in the destination branch?

I don’t know if this is possible, but it sure would be sweet. Let’s say I have two branches: master and releases. The master branch has all of these files: index.html style.scss style.css In the releases branch, I’ve deleted the scss file, because there’s no point in my including that development file in the release. […]

Git merge behavior (ahead of x by y commits)

I’ve came across Git behavior I cannot fully understand. The repo is used by tens of people. The case is like this: $ git checkout master $ git merge –no-commit feature Automatic merge went well; stopped before committing as requested $ git status On branch master Your branch is up-to-date with ‘origin/master’. All conflicts fixed […]

Git merging multiple branches with slashes in name

I’m trying to merge multiple branches I’ve created into one single branch. The branches are named like so: desktop/stack, desktop/account etc… I want to merge them into desktop/master, however it says it is already up to date. Is it because they all share the desktop name? If that’s the case, are any of the branches […]

Xcode git merge – no branches found

Within Xcode 6.4, I’m trying to merge a branch back to master on a remote and Xcode displays no branches at all when using any “Merge from Branch” or “Merge into Branch” menu option. When I check out a fresh copy from the remote, two branches are clearly seen on the remote. Master and the […]

Merge command from Git removes files

Git repository structure I have used the following commands in Git Bash: git checkout develop_2 git merge develop_1 Git was marked some files [deleted by us] and completed merge with conflicts. What should I do to add new files from develop_1 to develop_2?

git cherry-pick being ancestor-aware, not just applying a patch?

It sure would be nice if merge-like cleverness and awareness of common ancestors were available in cherry-pick. Is that possible? Suppose we have this situation. We have a development where commits are made to dev and are cherry-picked to release. [1] X—-Y—A1—A2—B—Z dev \ \—-B’ release A1: Remove function foo() A2: Re-add function foo() (ooops, […]

Merge between Git repositories with different history without getting the history from the other repo

I have two git repos closed and open. I created cloned open from closed and squashed all commits into one: $ git rev-list –max-parents=0 –abbrev-commit HEAD ffa625c $ git reset –hard ffa625c $ git merge –squash HEAD@{1} $ git commit $ git reset –soft “HEAD^” $ git commit –amend $ git gc –aggressive open is […]

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