Tag: git rebase

git rebase – what's the difference between 'edit' and 'reword'

What’s the difference between edit and reword when you do a git rebase? I’m going through some docs which say this: Replace pick with: – edit to mark a commit for amending. – reword to change the log message.

Git rebase failing

I’m trying to rebase the work of a colleague. First, I get a ton of conflicts where <<<<< head seams to contain the new code. Then after a while I get the following error: fatal: update_ref failed for ref ‘refs/heads/dev_504’: cannot lock ref ‘refs/heads/dev_504’: ref refs/heads/dev_504 is at XXXXXXX but expected XXXXXXXX Could not move […]

Did i just destroy my work by incorrectly using git rebase

This question already has an answer here: Undoing a git rebase 14 answers

How can I move commits from the trunk to a branch in Git?

I made a bunch of commits to the master and realized after the fact that they should have been in a branch. I’ve looked at various things about rebasing and merging and resetting the master. But no attempts at manipulation have yielded a history that looks like what I’m trying to do. My attempts lead […]

What's the difference between git rebase and merge –no-ff

Both approach seem to have the same purpose to have clean history: Git Rebase No fast forward (–no-ff) So, if I have done rebasing on a feature branch, do I still need –no-ff when merging back to the main branch? UPDATE: It seems to me there is a confusion between rebasing, fast forward and non […]

rebase – automatically continue if rerere resolved all conflicts

Git rerere provides for reuse of previous conflict resolutions during rebase, and can even stage the resolved files by setting rerere.autoupdate = True (as detailed in another question). However, even if all conflicts are resolved and all files staged, I still have to run git rebase –continue to continue the rebase operation. How can I […]

git rebase –editor=/something/other/than/vim? (for easier squashing)

I happily use vim as my default editor for commits, and do not wish to change it. However, when it comes to rebasing, I find myself squashing dozens and dozens of commits which I find much easier with an interactive editor like Textwrangler (substituting “pick” with “squash” in all but the top commit). Is there […]

git rebase “deleted by us” and “deleted by them”

Suppose I am rebasing experiment branch on master and there are conflicts in files. And of course there are files deleted in both branches. So when I am resolving the conflicts, in git status I see deleted by us and deleted by them. Its very confusing. Is there any way of understanding what they mean? […]

Issues with Git – rebase / squash

I’m trying to squash a few commits in a git repository. > git rebase -i HEAD~3 Successfully rebased and updated refs/heads/staging. A file opens titled git-rebase-todo : pick a2f3467 Require statement incorrect pick c41212e Require file in environment pick 2743221 This should work # Rebase c5f42f3..2743221 onto c5f42f3 # ………. I tried changing the bottom […]

Undo Git Rebase

I performed a git rebase master on my branch and didn’t realize it wasn’t what I wanted until after I pushed it to the remote. It’s only myself and 1 other person working on the project, so I know they’ve not pulled the latest changes. Reading other questions on StackOverflow, it said to use git […]

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