Tag: rebase

git rebase on top of current branch

I am attempting an interactive rebase against my current branch. Ie, I have a commit that fixes a typo, that I’d like to make into a ‘fixup’ on top of another commit. Sometimes this works. Sometimes this gives a strangely formatted error message like: # git rebase -i You asked me to rebase without telling […]

Merging selected files from similar branches after one was rebased

While I was working on feature1, at commit point A below, I was asked to build another mod onto it. Let’s call it feature1+. This means the graph looks like this: master: o—o—o—o—o \ feature1: o—e—e—e—O—A \ feature1+: o—c—c—X Now I want to merge feature1+ back onto feature1, but I realise the changes between files […]

Git rebase master and multiple branches

I have three branches: master, task_one, and task_two. I want to pull all updates made by other people, and apply these updates to all of my work. What are the correct commands?

Merge changes when a file on a branch has split into two files on the master

This is basically the result of a massive class C on the master having been refactored down the line into two smaller classes, C1 and C2. C was then made a subclass of C2 and cut down to a skeletal version for backward compatibility. So from that point on, master contained C, C1 and C2. […]

git – rebasing from multiple branches

I am working with 3 branches and I want to rebase one branch from two others at the same time. What I got with git log –graph –decorate –pretty=oneline –abbrev-commit are the followings: Branch A: * f751d1a (A) commit2 * 4e552f3 (master) commit1 Branch B: * 3770d35 (B) commit3 * 4e552f3 (master) commit1 Branch C, […]

How to merge any parallel changes from master into my branch, without modifying master?

I got really confused with merge or rebase. In master, at point A, I created a branch mybranch, checkout, and started working on it purely, while others keep working on master. It has been a while. Today, I found master has reached point B and I still haven’t finish the part in mybranch. However, I […]

Git rebasing not working correctly?

Git rebase doesn’t seem to be working the way I’d expect, based on my understanding of rebasing, and based on how I’ve seen rebasing work in Mercurial. I’ve generated an example to illustrate the strange behavior, and am hoping someone can explain why Git is behaving the way it is. Consider this state of the […]

Git Changing rebase

I have 3 branches: master, feature, bugfix… And the commits looks like this: 4-5-6(feature) | 1-2-3(master) | 7(bugfix) I did “git rebase bugfix feature” to test my feature with bugfix 1-2-3(master) | 7(bugfix)-4-5-6(feature) Now I need to rebase create a pull request for my feature branch without the bugfix, so I did “git rebase master […]

git rebase on other branch

given the following scenario: We develop features on different topic branches. Before the release we merge all the topic-branches into master. The continuous integration then starts on that branch Additionally we also make small changes (typos etc…) directly on the master branch If everything works fine we merge all the changes from the master branch […]

Amended commit in middle of branch with interactive rebase requires conflict resolution

For instance, master branch has init commit with content created by: echo “init” > data I created feature branch: git checkout -b feature Then was serially committed changes: for newLine in feature1 feature2; do echo “$newLine” >> data; git commit -am “$newLine” ; done I want to change feature1 commit: git rebase -i master Make […]

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