How can I make git accept a self signed certificate?

To permanently accept a specific certificate Try http.sslCAPath or http.sslCAInfo. Adam Spiers’s answer gives some great examples. This is the most secure solution to the question. To disable TLS/SSL verification for a single git command try passing -c to git with the proper config variable, or use Flow’s answer: git -c http.sslVerify=false clone https://example.com/path/to/git To … Read more

How to change the remote a branch is tracking?

Using git v1.8.0 or later: git branch branch_name –set-upstream-to your_new_remote/branch_name Or you can use the -u switch git branch branch_name -u your_new_remote/branch_name Using git v1.7.12 or earlier git branch –set-upstream branch_name your_new_remote/branch_name

Merge development branch with master

I generally like to merge master into the development first so that if there are any conflicts, I can resolve in the development branch itself and my master remains clean. (on branch development)$ git merge master (resolve any merge conflicts if there are any) git checkout master git merge development (there won’t be any conflicts … Read more

Is there a way to get the git root directory in one command?

Yes: git rev-parse –show-toplevel If you want to replicate the Mercurial command more directly, you can create an alias: git config –global alias.root ‘rev-parse –show-toplevel’ and now git root will function just as hg root. Note: In a submodule this will display the root directory of the submodule and not the parent repository. If you … Read more

How to permanently remove few commits from remote branch

You git reset –hard your local branch to remove changes from working tree and index, and you git push –force (or git push –force-with-lease) your revised local branch to the remote. (other solution here, involving deleting the remote branch, and re-pushing it) This SO answer illustrates the danger of such a command, especially if people … Read more

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