How do you fix a bad merge, and replay your good commits onto a fixed merge?

Please don’t use this recipe if your situation is not the one described in the question. This recipe is for fixing a bad merge, and replaying your good commits onto a fixed merge. Although filter-branch will do what you want, it is quite a complex command and I would probably choose to do this with … Read more

How to revert a “git rm -r .”?

git reset HEAD Should do it. If you don’t have any uncommitted changes that you care about, then git reset –hard HEAD should forcibly reset everything to your last commit. If you do have uncommitted changes, but the first command doesn’t work, then save your uncommitted changes with git stash: git stash git reset –hard … Read more

Staging Deleted files

Use git rm foo to stage the file for deletion. (This will also delete the file from the file system, if it hadn’t been previously deleted. It can, of course, be restored from git, since it was previously checked in.) To stage the file for deletion without deleting it from the file system, use git … Read more

Remove a folder from git tracking

I came across this question while Googling for “git remove folder from tracking”. The OP’s question lead me to the answer. I am summarizing it here for future generations. Question How do I remove a folder from my git repository without deleting it from my local machine (i.e., development environment)? Answer Step 1. Add the … Read more

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