How to remove/delete a large file from commit history in the Git repository?

Use the BFG Repo-Cleaner, a simpler, faster alternative to git-filter-branch specifically designed for removing unwanted files from Git history. Carefully follow the usage instructions, the core part is just this: $ java -jar bfg.jar –strip-blobs-bigger-than 100M my-repo.git Any files over 100MB in size (that aren’t in your latest commit) will be removed from your Git … Read more

How to rebase local branch onto remote master

First fetch the new master from the upstream repository, then rebase your work branch on that: git fetch origin # Updates origin/master git rebase origin/master # Rebases current branch onto origin/master Update: Please see Paul Draper’s answer for a more concise way to do the same – recent Git versions provide a simpler way to … Read more

How to cherry-pick multiple commits

Git 1.7.2 introduced the ability to cherry pick a range of commits. From the release notes: git cherry-pick learned to pick a range of commits (e.g. cherry-pick A..B and cherry-pick –stdin), so did git revert; these do not support the nicer sequencing control rebase [-i] has, though. To cherry-pick all the commits from commit A … Read more

Undoing a git rebase

The easiest way would be to find the head commit of the branch as it was immediately before the rebase started in the reflog… git reflog and to reset the current branch to it (with the usual caveats about being absolutely sure before reseting with the –hard option). Suppose the old commit was HEAD@{2} in … Read more

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