Tag: merge

Applying the changes from branch b to a, without merging or adding commits

My scenario is that I have one branch in which I’ve made big improvements to the build process (branch A) and in another I’m working on a unrelated feature (branch B). So now when I’m hacking away at branch B, I want to pull in the stuff I wrote in branch A because I want […]

How do I make Jenkins see a Git merge commit as a change?

Users A and B each make modifications (on different feature branches) to a particular repo. User A merges changes into staging branch. Jenkins builds the staging branch, and succeeds. User C (release manager for User B team) merges User B’s changes into staging branch. However, something in the merge goes wrong and isn’t noticed, such […]

In a git merge, how do you just replace your version with the version git says there is a conflict with?

I have two files: A and B. If I have been working on A and a partner is working on B, I want to merge files A and B. B is already committed. Let’s say my partner already made the changes I was working on, so I just want to replace my A file with […]

Git push fails to github: failed to read object

The story: I’ve been developing a RoR-app in both my desktop and laptop. It was quite handy to commit changes made on another, push them to github and fetch & merge on other. The starting point is this: I committed latest changes on my desktop, pushed them to github and then fetched and merged them […]

Git: how to revert a branch merge without overwriting history?

I have two branches: master and opengl. I recently finished implementation (or at least I thought so) of opengl branch and decided to merge it into master: git checkout master git merge opengl git push After I did this, several developers who are working on the master branch pulled my changes and it turned out […]

Pull request in GitHub does not show merge conflict was fixed and doesn't show my commits

I’m fixing merge conflicts for other contributors at the command line. Still learning how Git works here, so bear with me… Like so… git checkout -b otherusersbranch master git pull https://github.com/otheruser/myrepo.git otherusersbranch ….find and fix conflicts git add . git commit -m “fixing merge conflicts” git push origin otherusersbranch git checkout master git merge –no-ff […]

When I am using Git, should I rebase before I merge?

I am working on a large scale Rails project, and the team I am working with is using Github to manage the project. While many changes are worked on locally and then pushed directly to our development branch, we create a branch when we are going to work on a very large change. When the […]

Git 4-way merge

I used to work with 3-way merge tools like BC3, SourceGear, or P4 which usually show 4 components: base, left, right, and merged result. What Git seems to do, and rightly so especially in cases of a git rebase –onto seem to be a 4-way merge: left-base, left, right-base, right, merged result. Or in other […]

Moving commits from one branch to another

I’ve committed a bunch of changes onto the master branch of my git repository, and pushed it upstream (although I’m the only one working out of these.) What I want to do is to pull these last few commits off, roll back master to before the pulled-off commits, re-apply the commits onto the develop branch, […]

GitHub pull request showing commits that are already in target branch

I’m trying to review a pull request on GitHub to a branch that isn’t master. The target branch was behind master and the pull request showed commits from master, so I merged master and pushed it to GitHub, but the commits and diff for them still appear in the pull request after refreshing. I’ve doubled […]

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