rebase

Undoing a git rebase

Does anybody know how to easily undo a git rebase? The only way that comes to mind is to go at it manually: git checkout the commit parent to both of the branches then create a temp branch from there cherry-pick all commits by hand replace the branch in which I rebased by the manually-created branch In my current situation this is ...

Why does git svn dcommit lose the history of merge commits for local branches?

I have a local git repository created with git svn clone. I make a local branch, make some changes, switch back to master, git svn rebase and if it's all good, I merge my branch back into master. Then the tree looks something like this: Sometimes, later when I git svn rebase again and get some remote changes, it loses the fact that ...

How do I combine the first two commits of a Git repository?

Suppose you have a history containing the three commits A, B and C: A-B-C I would like to combine the two commits A and B to one commit AB: AB-C I tried git rebase -i A which opens up my editor with the following contents: pick e97a17b B pick asd314f C I change this to squash e97a17b B pick asd314f C Then Git 1.6.0.4 says:...

git workflow and rebase vs merge questions

I've been using git now for a couple months on a project with one other developer. I have several years of experience with svn, so I guess I bring a lot of baggage to the relationship. I have heard that git is excellent for branching and merging, and so far, I just don't see it. Sure, branching is dead simple, but when I try to merge,...

git rebase and git push: non-fast forward, why use?

I have a branch that should be available to other contributors and that should constantly stay up to date with the master. Unfortunately, every time I do 'git rebase' and then try to push, it results in 'non-fast forward' message and abortion of pushing. The only way to push here is to use --force. Does that mean I should use 'git merge...

git: how to squash the first two commits?

With git rebase --interactive <commit> you can squash any number of commits together into a single one. It's an OCD heaven. And that's all great unless you want to squash commits into the initial commit. That seems impossible to do. Any way to achieve it? Moderately related: In a related question, I managed to come up with a differ...

git: how to insert a commit as the first, shifting all the others?

I've asked before about how to squash the first two commits in a git repository. While the solutions are rather interesting and not really as mind-warping as some other things in git, they're still a bit of the proverbial bag of hurt if you need to repeat the procedure many times along the development of your project. So, I'd rather g...

How to use the Starteam vcmutility to automate a selective rebase?

In Borland Starteam I would like to automate a very simple rebase that only repins files (i.e. ignores everything else - assuming to be done with the wizard). Looking at the StarTeam Help "VCMUtility Session Options" I would like to set my DefaultAction for everything to ignore -- except source.modified should be repin. I do not see an...

Rebasing - can't get odbcint.dll to load at its preferred base

The default base address for an .exe built in Visual Studio is 0x00400000. The default base address for d3dx9_30.dll and odbcint.dll (which both live in %windir%\system32) is also 0x00400000. So by default, exes that link to either of these dlls will have a runtime address collision. The OS automatically relocates the dll to a differe...

format-patch works reasonably well, looking for a better way.

I have two branches that are different enough that rebasing seems to not work -- or I don't know how to do it. I have a "public" branch with a bunch of files removed (using filter-branch). Even though most of the commits match up in terms of deltas, the commit ids are all different. I've tried quite a few methods to pull changes from ...

Git: How to rebase many branches (with the same base commit) at once?

Hi, I have a master branch in my project, that I use to pull changes from other people. From that, I usually have several topic branches on which I'm currently working. My question is: Is there a way for me to pull new changes into my master and then rebase ALL of my topic branches onto that at once? This is the situation: D-...

Unable to understand Git branch, merge and rebase

I know the thread which says that rebase is for small changes of teamMates, while merge for large changes. I keep three Gits of three teamMates in the following directory structure where we all have the same initial code: project | - I | - myTeamMate1 | - myTeamMate2 The branches are not in the same Git. This means...

When would one need git-rebase?

Everytime I read the git-rebase documentation, I get lost. It feels to me like a kind of a low-level operation (read: dark magic). Quoting the docs: Assume the following history exists and the current branch is "topic": A---B---C topic / D---E---F---G master From this point, the result of either of the follo...

How to back up private branches in git

Hi all, I have a local branch for day-to-day dev work in git. My workflow is: Do stuff on local_branch, commit Fetch origin/master Rebase local_branch to catch up with new stuff from origin/master It all works fine, however most of the recommendations I encountered say that one should not "push" private branches, on which rebase is...

How to efficiently rebase and push a local git branch?

Hi, we're using a central git repository which I've cloned and I'm working on a local branch. When I want to make my changes available in the central repository, I have to issue the following commands (starting on mybranch): #Stash local changes not yet ready for checkin git stash #Make sure we have all changes from the central reposit...

How do you rebase hyperlinks and content in an ASP.NET page?

I have an ASP.NET page to handle "404 page not found" it's setup by configuring the <customErrors> section in my web.config file and setting the custom error page for 404 errors in IIS manager. It works as expected for pages in the root of my website but doesn't work in a subdirectory of the site - the hyperlinks and content in my custo...

Git: Move a branch to a new tag

My personal Wordpress install is cloned from the wordpress git mirror on GitHub. I checked out the 2.7.1 tag to the branch "stable" (git checkout -b stable 2.7.1) and its been running fine since. Now WordPress 2.8 has been released I want to move my stable branch to the 2.8 tag. I tried the following (all on the stable branch) but get c...

Git rebasing onto a branch which will be created later

Hi, I'm working on a web site project that is currently tracked in svn but is going to move to git once someone else has time to set up a new server and stuff. It's a long story, but in the meantime I've made my own git repository from some code I had, and worked on it quite a bit. I didn't use git svn clone because I'm overseas and my ...

Git rebase continually fails and requires manual merge intervention

I am having an issue with rebasing from master on to a 'deploy' branch within one of my repositories. My repo is setup as follows: master - of course, the main branch deploy - a branch created where files like Capfile, deploy.rb etc are created and configured - these changes will NEVER be merged back into Master Generally my workflow...

Integrator workflow, Is fetch-rebase-push safe for remote repos?

I'm managing a git repo using the integrator work flow. In other words, I pull commits from my co-workers, and push them out to the blessed repo. I'd like to keep the commit history linear for most cases, so is it OK to do a rebase instead of a merge when I integrate changes? Here is an example: git fetch coworker git checkout coworker...