Delete all local git branches

The ‘git branch -d’ subcommand can delete more than one branch. So, simplifying @sblom’s answer but adding a critical xargs: git branch -D `git branch –merged | grep -v \* | xargs` or, further simplified to: git branch –merged | grep -v \* | xargs git branch -D Importantly, as noted by @AndrewC, using git … Read more

How to install the JDK on Ubuntu Linux

Referring to Ask Ubuntu question How to set JAVA_HOME for OpenJDK?, How to install Open JDK (Java developement kit) in Ubuntu (Linux)? Open Terminal from Application Dash or press Ctrl+Alt+T Update repository: sudo add-apt-repository ppa:openjdk-r/ppa # only Ubuntu 17.4 and earlier sudo apt update Optional: To search available distributions of openjdk, use the following command: … Read more

How to permanently add a private key with ssh-add on Ubuntu? [closed]

A solution would be to force the key files to be kept permanently, by adding them in your ~/.ssh/config file: IdentityFile ~/.ssh/gitHubKey IdentityFile ~/.ssh/id_rsa_buhlServer If you do not have a ‘config’ file in the ~/.ssh directory, then you should create one. It does not need root rights, so simply: nano ~/.ssh/config …and enter the lines … Read more

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