Should I use past or present tense in git commit messages? [closed]

The preference for present-tense, imperative-style commit messages comes from Git itself. From Documentation/SubmittingPatches in the Git repo: Describe your changes in imperative mood, e.g. “make xyzzy do frotz” instead of “[This patch] makes xyzzy do frotz” or “[I] changed xyzzy to do frotz”, as if you are giving orders to the codebase to change its … Read more

What is the Sign Off feature in Git for?

Sign-off is a requirement for getting patches into the Linux kernel and a few other projects, but most projects don’t actually use it. It was introduced in the wake of the SCO lawsuit, (and other accusations of copyright infringement from SCO, most of which they never actually took to court), as a Developers Certificate of … Read more

How to fix committing to the wrong Git branch?

If you haven’t yet pushed your changes, you can also do a soft reset: git reset –soft HEAD^ This will revert the commit, but put the committed changes back into your index. Assuming the branches are relatively up-to-date with regard to each other, git will let you do a checkout into the other branch, whereupon … Read more

Make the current commit the only (initial) commit in a Git repository?

Here’s the brute-force approach. It also removes the configuration of the repository. Note: This does NOT work if the repository has submodules! If you are using submodules, you should use e.g. interactive rebase Step 1: remove all history (Make sure you have a backup, this cannot be reverted) cat .git/config # note <github-uri> rm -rf … Read more

Skip Git commit hooks

Maybe (from git commit man page): git commit –no-verify -m “commit message” ^^^^^^^^^^^ -n –no-verify This option bypasses the pre-commit and commit-msg hooks. See also githooks(5). As commented by Blaise, -n can have a different role for certain commands. For instance, git push -n is actually a dry-run push. Only git push –no-verify would skip … Read more

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