Reverting an interactive git rebase

If you have just done the rebase, you can try as mentioned here: git reset –hard ORIG_HEAD as Jakub NarÄ™bski details: ORIG_HEAD is previous state of HEAD, set by commands that have possibly dangerous behavior, to be easy to revert them. It is less useful now that Git has reflog: HEAD@{1} is roughly equivalent to … Read more

Comparing differences across a rebase in Git

Even better than interdiff, now with Git 2.19 (Q3 2018) you have git range-diff. See “Git diff – two disjoint revision ranges” The git range-diff documentation includes the following example: When a rebase required merge conflicts to be resolved, compare the changes introduced by the rebase directly afterwards using: $ git range-diff @{u} @{1} @ … Read more

How do I use Git’s interactive rebase with a local-only repository (no remote / origin)?

git rebase -i in shorthand, without specifying a destination branch, will make git assume that you are trying to rebase against a remote branch tracked by your branch. That’s why the error message is mentioning stuff about remotes. When you do specify a target, git will rebase against that commit-ish: git rebase -i <commit-ish>

git: branches diverged; how to proceed?

There are, of course, several ways you could do this manually. You’ll still have the same conflicts because git is basically doing this for you under the hood. But if you want to do this manually, here are a couple of ways. First, export your commits as a series of patches. The easiest way to … Read more

git rebase – what’s the difference between ‘edit’ and ‘reword’

“reword” allows you to change ONLY the commit message, NOT the commit contents “edit” allows you to change BOTH commit contents AND commit message (the mechanism by which git allows you to edit the commit contents is by “pausing” the rebase; so you can amend the commit) reference : The git-rebase documentation says this: edit … Read more

Git interactive rebase without opening the editor

TL;DR answer: GIT_SEQUENCE_EDITOR=: git rebase -i HEAD~3 You can’t stop git rebase –interactive from running the “sequence editor” (that’s the edit command on the “sequence file” containing the various pick, etc., commands). However, if you examine the interactive rebase script: $ vim $(git –exec-path)/git-rebase–interactive you’ll find code like this near line 230 or so: git_sequence_editor … Read more

What’s the difference between `git fetch` then `git rebase`, and `git pull –rebase`?

The truth is that they ARE different. Here’s a really helpful web page which explains it beautifully: http://gitolite.com/git-pull–rebase.html So git pull –rebase has some significant magic over git fetch; git rebase which most of the time you won’t notice, but in cases where the upstream maintainer has naughtily ignored all those stern warnings and decided … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)