Tag: git merge

Git merge several branches and lose changes from one of them

In our work project we had several branches being (ultimately) merged together. A – master B – proof-of-concept C – feature-1 D – feature-2 E – feature-3 All branches are originally branched from A. B is never merged back into A, but the other branches can be. During a particular commit, all the changes from […]

Commit is in git tree, but does not appeared to be applied to code

So I’m trying to figure out a weird issue where a commit was made, merged into our master branch, but then in the following commit the code tied to that commit appears to just disappear. The commit hash is 4516ce019 and on github the commit is still on the tree, as well as on my […]

How to merge two branches with the Mac OS X git client Gity

I’m having trouble merging two branches with Gity. When I do a checkout on my alternative branch and click: “Merge into master” nothing seems to happen… Any thoughts?

git squash when merging branches

i am wondering what happens if you squash between branches and push/pull from remote in between. DEVELOPER 1 1. $ git checkout foo 2. $ git commit -m ‘changed file’ file.txt $ git commit -m ‘changed another file’ file2.txt 3. $ git push DEVELOPER 2 4. $ git checkout foo 5. $ git pull // […]

Two projects with common code

I am assigned to two projects, both of which are derived from a common parent and targeted to be merged back to the parent around the same time. To make it simple, let’s call them master, projA and projB. Let’s say the folder structure of the source code is: /src/main/UI /src/main/backend Let’s say there is […]

kdiff: was merge successful

I’m trying to write a merge driver for git that used the kdiff3 for merge and conflict resolution. I need a way to know if kdiff3 was successful in the merge or not. So far I’ve got this: #!/bin/bash Kdiff3 “${1}” “${2}” “${3}” -o “${1}” –L1 “Working Copy” –L2 “Nearest Common ancestor” –L3 “Version from […]

github/egit/git: compare master with an earlier commit and merge selected changes into a new branch. how?

DESIRED I am a sole developer (and a beginner). I have a master branch only at the moment. Within it, I have some commits that are really different versions with different types of implementations. So, I want to make them into new branches. But I also have some functionality in the master branch that I […]

Find out if my feature branches made it to master

I’m working on a open source project where a sequence of events might look like: Create branch feature-1, code away, push feature-1 to my GitHub, issue a pull-request Repeat for feature-2, feature-3, etc. Weeks pass and I regularly pull project/master into my local master I see feature-1 turn up as a merge, then feature-3, but […]

Merge two reformatted PHP files with GIT

We have two branches in GIT with some PHP-files. All we need to do is to merge one into another. Unfortunately, there are two huge files that was auto-reformatted with our IDEs (spaces, braces, line-breaks etc). When we try to merge them, GIT shows a hell of a lot of conflicts, that are not humanly […]

Merging remote content to local repo

I am trying to clone a remote repo to my local workspace, and push the content to a new bare repo I set up to maintain, this repo need to have occasional updates from upstream repo, and new contents need to be pushed to local repo as well. Here is a example: git clone ssh://username@whatevergitrepo.com/project […]

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