Git merge submodule into parent tree cleanly and preserving commit history

The best approach is to do subtree merging. First, remove the submodules and related configuration from your superproject; Edit your .gitmodules file to remove the submodules affected, or delete the file entirely if you intend to merge all submodules. Delete the submodule directories as well. Next, add the submodule repositories as proper remotes to your … Read more

Is there a way to specify a default option for merging a pull request in GitHub?

The GitHub user interface will default the option to the last option selected by the user for the current project. This solves the issue of not accidentally using the wrong default, since after the merge is done correctly for the first PR, subsequent merges will have the desired default. This solution isn’t perfect. If a … Read more

How to switch a remote repository to a different branch

Below is my method to switch and work for a remote branch of a Git repository. Have a look for all the branches first, just input following command in the terminal: git branch –all And then you will see the all the branches on local and remote. Something like this: *master remotes/origin/develop remotes/origin/master remotes/origin/web remotes/origin/app … Read more

How to undelete a branch on github?

If you know the last commit message of the deleted branch you can do this: git reflog # search for message fd0e4da HEAD@{14}: commit: This is the commit message I want # checkout revision git checkout fd0e4da or git checkout HEAD@{14} # create branch git branch my-recovered-branch # push branch git push origin my-recovered-branch:my-recovered-branch

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