Tag: rebase

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 […]

What could cause “number of commits ahead” to change after rebasing?

Before rebasing a feature branch that I hadn’t touched in a few weeks, it was 25 commits ahead of master. After rebasing, it is now 18 commits. There were several conflicts I had to resolve along the way. Possibly exactly 7. What could cause this number change? Cherry picks that were discovered along the way […]

Is merge without conflicts equivalent to rebase without conflicts?

Is it correct that a git merge will succeed with no conflicts if and only if the corresponding git rebase will succeed with no conflicts?

How to change a fresh git repository into a branch from another repo?

I downloaded a 3rd party project as non-tracked files (without .git folder) and started a new git repository with $git init in it, to track my changes. I later found out that this project already has a public git repository, which has the same state as the bare files I downloaded (is identical to my […]

Move remote branch tip from one branch to another

I did a rebase –onto to move a previous commit (c4) from master to a feature branch. But I had already pushed master to the remote origin. So currently now I have c1 – c2 – c3 – c5(master HEAD) \ c4(feature HEAD) – c5(origin/master HEAD) I realize that fixing this will screw up anyone […]

git rebase fails with Unknown exit code (128) from command: git-merge-recursive

Consider the following scenario: – upstream repository with 2500 is stored in SVN – git user A imports the repository into git and commits 1 patch – git user B imports the repository into git and commits 1 patch – git user A wants to merge the patch from git user B In this case, […]

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