rebase

Getting rid of a dangling changeset after rebase in mercurial

Hi, I did a hg update --force <repo> hg pull --update --force <other repo> to get another seemingly unrelated repository into the current one. Afterwards I merged the first changeset of the other repo (to get renamings "right"). A rebase of the other repository starting from the second changeset left the first changeset (here: revisio...

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. On that master commit git said C was renamed to C1....

git: correct way to merge/rebase with respect to svn dcommit

I have the following situation (mostly because I didn't really thought it through in the beginning -- or more exactly, I thought it shouldn't be a problem the way I did this but now I am stumbled): ... --- A --- B1 --- ... --- Bn ... --- git-svn Whereby A and git-svn are at the same state (exactly the same files and file content) but...

Rails and Git workflow advice.

Hi Everyone, I need some advice with my desired setup with git and Rails. Basically for my first Rails application I used a base application template from GitHub, I then made a ton of changes and now have a full application which is fairly customised. I have now extracted all of the changes I made to the files within the base applica...

Cherrypicking versus Rebasing

The following is a scenario I commonly face: You have a set of commits on master or design, that I want to put on top of production branch. I tend to create a new branch with the base as production cherry-pick these commits on it and merge it to production Then when I merge master to production, I face merge conflicts because even tho...

how to use git rebase to clean up a convoluted history

After working for several weeks with a half dozen different branches and merges, on both my laptop and work and my desktop at home, my history has gotten a bit convoluted. For example, I just did a fetch, then merged master with origin/master. Now, when I do git show-branches, the output looks like this: ! [login] Changed domain name...

git rebase, keeping track of 'local' and 'remote'

When doing a git rebase, I often have difficulty working out what is happening with the 'local' and 'remote' when resolving conflicts. I sometimes have the impression that they swap sides from one commit to the next. This is probably (definitely) because I still haven't properly understood. When rebasing, who is 'local' and who is 'rem...

git workflow: throwaway merges and git-rerere - what's the point?

Like most people new to Git, I've had my share of confusion trying to decipher the use cases applicable to git merge and git rebase. I think I've finally decided that, as far as the resulting working copy state, they give you the same thing. Also, they both result in the same conflicts. If this is incorrect, please provide an example ...

git svn rebase resulted in byte order is not compatible error

Following is the error I am getting when I tried 'git svn rebase': Byte order is not compatible at ../../lib/Storable.pm (autosplit into ../../lib/auto/Storable/_retrieve.al) line 380, at /usr/lib/perl5/5.10/Memoize/Storable.pm line 21 The version of perl I am running is: $ perl --version This is perl, v5.10.1 (*) built for i686-cyg...

Why does git pull --rebase fail when replaying existing commits?

I don't get this: when I 'git pull --rebase remote branch' it reverts my HEAD back to their shared root and then starts replaying all of the remote commits that have happened in the meantime. Why do these commits sometimes fail? They are clean commits on a clean workspace? Isn't that almost the point of rebasing? ...

Subversion rebase?

I find this way easier to merge branches and less conflicts: Copy trunk to a new branch, merge it with feature branch/s. When things done, merge the new branch back to the trunk. This technique is quite like the mercurial and git rebasing. I used to merge whatever changs from trunk to feature branche/s. But later when I merged the...

Deleting/"Rebasing" rails migrations

Hi guys, I've been working in a git branch on one portion of a rails site. I've made a lot of random changes to the schema while iterating, and I've made some migrations that revert previous migrations to add columns and things like that. Is it OK to delete redundant migrations like those (i.e. pairs of migrations that are just reverses...

How to push from an often rebased git-svn repo

I do all my daily work through git-svn, queuing up checkins and rebasing like a mad-man :) the down side to this is I often have a couple days work queued up (tisk tisk i know) and it makes me a little nervous that its only in one place. If I was not using git-svn and rebasing all the time i would just push my changes to another computer...

How do I rebase in mercurial without merging?

When I try to hg rebase -s 1775 --collapse, I am asked to merge all the files I touched since rev 1774. How can I avoid that? Details I am just learning how to rebase. I successfully tried the example given here, and a few minor variations. However, in my own repository, when I try the same steps, I am asked to merge a boat-load of ...

How do I make a copy of a branch for testing rebase?

I've done this before by creating a clone and doing the rebase in the clone, but I suspect I could do it safely on a separate branch. I have a feature branch feat-x with about 25 commits on it. I'd like to (safely) squash several of these together. (I say "safely" because the first couple of times I squashed I didn't get it right -- bu...

Ruby + Git: Integrating Changes On A Significantly Divergent Branch

i have an open source ruby project on github, where my master branch represents what has been released, and my dev branch represents what will be released next. the master branch is ~ 80+ commits behind the dev branch, and the dev branch contains fairly significant architectural changes. a contributor has sent me a pull request for cha...

Fatal error with `git rebase upstream-branch` in topic branch

I have an issue when I try to rebase an upstream branch into a topic branch. The workflow is like this: git checkout upstream git pull origin upstream git checkout topic git rebase upstream The result looks like this: First, rewinding head to replay your work on top of it... Applying Refactored database access and added logging error...

Conflicts with `git rebase`

So, yesterday I posted a question regarding some weird conflicts when I tried to rebase an upstream branch into my local topic branch. In the end I used git rebase --merge upstream and solved a lot of conflicts in files I haven't touched since the previous rebase. My understanding of rebase in such a case is that it detaches my commits...

git move a branch's start forward in the tree

Okay I almost have this rebase thing figured out. I can feel a breakthrough coming - here is the tipping point: How do I do a rebase to go from: A - - B - - C - - D - - E (HEAD) | \ - - F - - G (branch1) To: A - - B - - C - - D - - E (HEAD) | \ - - F - - G (branch1) I don't just want to merge H...

Create a git branch from selected commits on another branch

I created a "feature" branch off master and worked for a long while. I then fetched the latest master branch commits and rebased my "feature" branch commits on top of it. Then I merged "feature" into master. However, I forgot about the merge and continued committing into the "feature" branch. I want those commits in a new branch now,...