git, filter-branch on all branches

The solution is simple: git filter-branch [options] — –all Note the four dashes (two sets of double dashes with a space in between) in — –all. If you look at the docs for git-filter-branch, it says this: git filter-branch [–env-filter <command>] [–tree-filter <command>] [–index-filter <command>] [–parent-filter <command>] [–msg-filter <command>] [–commit-filter <command>] [–tag-name-filter <command>] [–subdirectory-filter <directory>] … Read more

Remove file from git repository (history)

I can’t say for sure without access to your repository data, but I believe there are probably one or more packed refs still referencing old commits from before you ran git filter-branch. This would explain why git fsck –full –unreachable doesn’t call the large blob an unreachable object, even though you’ve expired your reflog and … Read more

Purging file from Git repo failed, unable to create new backup

You have already performed a filter-branch operation. After filter-branch, Git keeps refs to the old commits around, in case something goes wrong. You can find those in .git/refs/original/…. Either delete that directory and all files within, or use the -f flag to force Git to delete the old references. git filter-branch -f \ –index-filter ‘git … Read more

Remove refs/original/heads/master from git repo after filter-branch –tree-filter?

refs/original/* is there as a backup, in case you mess up your filter-branch. Believe me, it’s a really good idea. Once you’ve inspected the results, and you’re very confident that you have what you want, you can remove the backed up ref: git update-ref -d refs/original/refs/heads/master or if you did this to many refs, and … Read more

How to amend several commits in Git to change author

Warning: now deprecated in favor of filter-repo. Rebase/amend seems inefficient, when you have the power of filter-branch at your fingertips: git filter-branch –env-filter ‘if [ “$GIT_AUTHOR_EMAIL” = “incorrect@email” ]; then GIT_AUTHOR_EMAIL=correct@email; GIT_AUTHOR_NAME=”Correct Name”; GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL; GIT_COMMITTER_NAME=”$GIT_AUTHOR_NAME”; fi’ — –all (split across lines for clarity, but not necessary) Be sure to inspect the result when you’re done, … Read more

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