rebase

In git, what is the difference between merge --squash and rebase?

I'm new to git and I'm trying to understand the difference between a squash and a rebase. As I understand it you perform a squash when doing a rebase. ...

How to rebase one Git repository onto another one?

Hi there! I had one Git repository (A) which contains the development of a project until a certain point. Then I lost the USB stick this repo A was on. Luckily I had a backup of the latest commit, so I could create a new repository (B) later where I imported the latest project's state and continue development. Now I recovered that lost ...

Recover from inadvertent skip during rebase

I just tried to rebase a very old branch with a minor modification onto my master. There was a problem with merging just one of the three files involved, so I did an unthinking --skip, thinking that it would just skip that file, but as it happened, it seems to have skipped all my changes, and rolled forwards. So now the rebase is finishe...

When should I use git pull --rebase?

I know of some people who use git pull --rebase by default and others who insist never to use it. I believe I understand the difference between merging and rebasing, but I'm trying to put this in the context of git pull. Is it just about not wanting to see lots of merge commit messages? Or are there other issues? ...

git: how to not delete files when rebasing commits with file deletion

I have a branch that I would like to rebase onto the lastest commit on my master. The problem is that one of the intervening commits on master was to delete and ignore a particular set of files (see this question). If I just do a straight rebase, those files will get deleted again. Is there anyway of doing this, inside git, rather than...

Can I make fast forwarding be off by default in git?

I can't really ever think of a time when I would use git merge rather than git rebase and not want to have a commit show up. Is there any way to configure git to have fast forwarding off by default? The fact that there's an --ff option would seem to imply that there's a way, but I can't seem to find it in the documentation. ...

Can I rename LOCAL, REMOTE and BASE as used in git mergetool?

Lets say I'm doing a rebase B of a branch onto master and there's a conflict. git opens up the default merge tool with 3 files as input : file.LOCAL, file.BASE, file.REMOTE (they're named a little differently, but LOCAL, BASE and REMOTE are in the file names and is how they are distinguished). Now, according to the mergetool man page: ...

What is the advantage of the rebase command in Mercurial?

Compare to standard push/pull, what is the advantages of using the rebase command in Mercurial? ...

How to resync git with svn tree?

Background I'm adding some features to a project that uses subversion - I'm using git-svn to clone it to my local repository, git-svn rebase to keep with the recent changes in the official trunk and keep the history linear. Recently I've forgot myself and made a few merges which messed my rebasing - long story short I needed to spend ...

recovering from git rebase

I have a local branch work, where I created two new files a.py, b.py and committed them. Then, instead of doing "git rebase origin/master", I accidently typed "git rebase origin master", and now the commit I did is gone and the files are gone. Does anyone know how I can recover my files? ...

When will `git pull --rebase` get me in to trouble?

I understand that when I use git pull --rebase, git will re-write history and move my local commits to occur after all of the commits in the branch I just pulled from. What I don't understand is how this would ever be a bad thing. People talk about getting in to trouble with git pull --rebase where you can end up with a branch that o...

Why does rebase cause commit conflicts?

Could somebody please explain to me why people warn about commit conflicts occuring from a rebase operation? I tried reading about this by searching google but had some trouble understanding. If it matters, I am using ClearCase revision control. ...

A file was added to git on commit n. How do I add it instead to commit n-m?

I have a branch. Half way through I noticed git was not tracking a file that it should have been and so I added it as part of a commit and continued with my work. Now, I'm doing a git bisect and all commits before the file was added do not build. So I'm thinking, I need to split the commit that added the file into two parts: the file add...

Hg: How to do a rebase like git's rebase

Hey guys, In Git I can do this: 1. Start working on new feature: $ git co -b newfeature-123 # (a local feature development branch) do a few commits (M, N, O) master A---B---C \ newfeature-123 M---N---O 2. Pull new changes from upstream master: $ git pull (master updated with ff-commits) master A---B---C---D---E--...

How to force rebase when same changes applied to both branches manually?

My repository looks like: X - Y- A - B - C - D - E branch:master \ \ \ \ merge master -> release \ \ M --- BCDE --- N branch:release Here "M - BCDE - N" are manually (unfortunately!) applied changes approximately same as separate comm...

Do I need to perform a commit after a rebase?

I've just rebased a feature branch onto another feature branch (in preparation for rebasing everything to the head of my master), and it involved quite a few tricky merge resolutions. Is the rebase automatically saved as a commit somewhere? Just where do those modifications live? I can't see anything in gitk, or git log --oneline. (S...

Rebasing and what does one mean by rebasing pushed commits

It is often said that, you should not rebase commits that you have already pushed. What could be meaning of that? ...

git rebase branch with all subbranches

is it possible to rebase a branch with all it's subbranches in git? i often use branches as quick/mutable tags to mark certain commits. * master * * featureA-finished * * origin/master now i want to rebase -i master onto origin/master, to change/reword the commit featureA-finished^ after git rebase -i --onto origin/master origin/mas...

SVN Merge, then rebase.

I am trying to find the proper way to reintegrate the changes in my SVN branch to the trunk, and the rebase. I have successfully merged my changes from the branch back to the trunk using, reintegrate merge http://mybranch into C:\code\trunk Now i need to recreate my development branch from the trunk. What is the best way to do th...

What does it mean when git pull causes a conflict but git pull --rebase doesn't?

I'm pulling from a repository that only I have access to. As far as I know, I've only pushed to it from one repository. A couple of times, I've tried pushing to it and gotten this: To [email protected]:tsched_dev.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to '[email protected]:ts...