Git submodule update

This GitPro page does summarize the consequence of a git submodule update nicely When you run git submodule update, it checks out the specific version of the project, but not within a branch. This is called having a detached head — it means the HEAD file points directly to a commit, not to a symbolic … Read more

Git refusing to merge unrelated histories on rebase

During git rebase origin/development the following error message is shown from Git: My Git version is 2.9.0. It used to work fine in the previous version. How can I continue this rebase allowing unrelated histories with the forced flag introduced in the new release?

Squash my last X commits together using Git

Use git rebase -i <after-this-commit> and replace “pick” on the second and subsequent commits with “squash” or “fixup”, as described in the manual. In this example, <after-this-commit> is either the SHA1 hash or the relative location from the HEAD of the current branch from which commits are analyzed for the rebase command. For example, if … Read more

How can I switch to another branch in git?

If another_branch already exists locally and you are not on this branch, then git checkout another_branch switches to the branch. If another_branch does not exist but origin/another_branch does, then git checkout another_branch is equivalent to git checkout -b another_branch origin/another_branch; git branch -u origin/another_branch. That’s to create another_branch from origin/another_branch and set origin/another_branch as the … Read more

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