Tag: git merge

Merging two branches with Xcode

I am trying to merge two branches to gather in Xcode but can not seem to do it. The steps I take are the following. SourceControl > Merge from branch > pick the branch I want to get the new code from > then hit merge. What popup is a warning that states this: The […]

Removing branch merged in history?

How could I remove a branch I had merged into master in the past ? From something like : master … a—> b —> c ———> d —–> e —> f —> g —> h \ / x —> y ——> z branch1 to : … a—> b —> c ———> d —–> f —> […]

How to squash commits in one branch?

I made a branch of trunk and been submitting/committing lots of changes. Every so often I would update the branch by merging from trunk (eg. 20 commits, then a merge-update, 20 more commits then a merge-update, etc). Now I would like to squash everything in my branch. How can I do this (using either Git […]

Can't change branch or commit because of unmerged files. Can't merge or stash files because I'm in the wrong branch

I went to push some files but got a merge error. I fixed it and went to merge again but got an error that I was no longer in the branch. I went to switch back to the branch but couldn’t; I got an error saying I still needed to merge my changes. Of course […]

Conflicts while merging – how to tell git to always use newer?

i was just trying to merge two repositories. For some reason, the merging didn’t go well and created a lot of conflicts. Most of them are due to the fact that i upadated a component in one version. So what i would like to do is merge and wherever a conflict pops up, tell git […]

git merge pull branches confusion

I have 2 branches (master and dev). Another worker has pushed a new branch called stage into the repository so that stage is now 1 commit ahead of master. I am trying to pull down stage so that I can merge it into master (and thus merge into dev), but I am having issues pulling […]

will git pull auto merge if pulled from _any_ remote?

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 “faraway”] url = ssh://faraway.com fetch = +refs/heads/*:refs/remotes/faraway/* if I do git checkout master; git pull origin then: fetch will run merge will merge the fetched branch with my current branch. […]

What is the correct 'git-add' command to issue after running 'git-mergetool'?

I’m unclear on the correct sequence of Git commands required to complete a merge that has resulted in conflicts. I understand that one approach is to follow the rejected merge with something like git mergetool # Then once everything has been fixed git add ?? git commit -m “Some message” but it isn’t clear to […]

synchronize between 2 git repositories

I have 2 bare repositories. They are made like this: ssh git@primary.com git init –bare repo1 ssh git@backup.com git clone –bare git@primary.com:repo1 One is used for development (let’s call it primary) and one is used for backup (in case first is not accessible). Is it possible to automatically synchronize them – something like doing git […]

How to merge branches with different case on windows in GIT?

My colleague created by accident a branch named develop-client (lower case ‘c’) from our main branch “develop-Client” (upper case ‘C’). We all work on windows. Now, how I can merge the develop-client back into develop-Client? Git in windows sees both branches as one, so when I try do “git merge –no-ff origin/develop-client” (when I am […]

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