Create Git branch with current changes

If you hadn’t made any commit yet, only (1: branch) and (3: checkout) would be enough. Or, in one command: git checkout -b newBranch With Git 2.23+ (Q3 2019), the new command git switch would create the branch in one line (with the same kind of reset –hard, so beware of its effect): # First, … Read more

Global Git ignore

You need to set up your global core.excludesfile configuration file to point to this global ignore file e.g: *nix or Windows git bash: git config –global core.excludesFile ‘~/.gitignore’ Windows cmd: git config –global core.excludesFile “%USERPROFILE%\.gitignore” Windows PowerShell: git config –global core.excludesFile “$Env:USERPROFILE\.gitignore” For Windows it is set to the location C:\Users\%username%\.gitignore. You can verify that … Read more

How do I provide a username and password when running “git clone git@remote.git”?

Based on Michael Scharf’s comment: You can leave out the password so that it won’t be logged in your Bash history file: git clone https://username@github.com/username/repository.git It will prompt you for your password. Alternatively, you may use: git clone https://username:password@github.com/username/repository.git This way worked for me from a GitHub repository.

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