Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
#
# Git commit-msg hook. If your branch name is in the form "LMS-1234-postfix", or
# "LMS-1234_postfix", it automatically adds the prefix "[LMS-1234]: " to commit
# messages.
# Example
# =======
#
@lengocthuong15
lengocthuong15 / Git_TipsNTricks.md
Last active September 21, 2021 14:42
Git Tips n Tricks

Tips and tricks for git

How to cherry-pick a commit from another git repo?

First link the projects

cd /home/you/projectA
git remote add projectB /home/you/projectB
git fetch projectB

Then you can cherry-pick the commits:

@lengocthuong15
lengocthuong15 / set-default-shell.md
Created September 7, 2021 09:20
Configuring the default shell for OpenSSH in Windows

The commands for check and set default shell for OpenSSH in Windows via PowerShell.

Sets the default shell to be powershell.exe

New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force

Sets the default shell to be wsl

New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\WINDOWS\System32\bash.exe" -PropertyType String -Force
@lengocthuong15
lengocthuong15 / install_ohmyzsh_for_dummies.md
Created September 7, 2021 03:56
Setup ohmyzsh and all needed plugins for dummies

Setup ohmyzsh and all needed plugins for dummies

Install zsh, ohmyzsh

Install git, wget, curl

$ sudo apt install curl wget git

Install zsh

$ sudo apt install zsh