How can I get the current git branch in gradle?

You also are able to get git branch name without the plug-in. def gitBranch() { def branch = “” def proc = “git rev-parse –abbrev-ref HEAD”.execute() proc.in.eachLine { line -> branch = line } proc.err.eachLine { line -> println line } proc.waitFor() branch } Refer to: Gradle & GIT : How to map your branch … Read more

How can I use SSH remotes with GitHub Desktop?

As more recently seen in “Permission failure cloning in Git in Windows”, try and launch GitHub Desktop after: (warning: read comments first) git config –global core.sshCommand “‘C:\Windows\System32\OpenSSH\ssh.exe'” That will ensure GitHub Desktop to use the right OpenSSH ssh.exe, instead of an internal one, as seen in desktop/desktop issue 5641. If Git bash does not work … Read more

How can I use husky to check a git commit message format?

With Husky 7+, you can add the following to .husky/commit-msg file: #!/usr/bin/env sh . “$(dirname — “$0″)/_/husky.sh” message=”$(cat $1)” requiredPattern=”^(add|cut|fix|bump|make|start|stop|refactor|reformat|optimise|document|merge) .*$” if ! [[ $message =~ $requiredPattern ]]; then echo “-” echo “-” echo “-” echo “🚨 Wrong commit message! 😕” echo “The commit message must have this format:” echo “<verb in imperative mood> <what … Read more

Merging pull requests together

Say if you have 3 pull requests A,B,C which are on three branches bA,bB,bC. and your main branch is master. First get all of his branches to your local repo without merging it. git fetch his-repo so now your repo may have four branches: master, bA, bB, bC I will create a branch from master … Read more

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