Git push requires username and password

A common cause is cloning using the default (HTTPS) instead of SSH. You can correct this by going to your repository, clicking “Clone or download”, then clicking the “Use SSH” button above the URL field and updating the URL of your origin remote like this: git remote set-url origin git@github.com:username/repo.git You can check if you … Read more

Pretty Git branch graphs

Update 2: I’ve posted an improved version of this answer to the Visualizing branch topology in Git question, since it’s far more appropriate there. That version includes lg3, which shows both the author and committer info, so you really should check it out. Leaving this answer for historical (& rep, I’ll admit) reasons, though I’m … Read more

How can I get a list of Git branches, ordered by most recent commit?

Use the –sort=-committerdate option of git for-each-ref; Also available since Git 2.7.0 for git branch: Basic Usage: git for-each-ref –sort=-committerdate refs/heads/ # Or using git branch (since version 2.7.0) git branch –sort=-committerdate # DESC git branch –sort=committerdate # ASC Result: Advanced Usage: git for-each-ref –sort=committerdate refs/heads/ –format=”%(HEAD) %(color:yellow)%(refname:short)%(color:reset) – %(color:red)%(objectname:short)%(color:reset) – %(contents:subject) – %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))” … Read more

Remove tracking branches no longer on remote

git remote prune origin prunes tracking branches not on the remote. git branch –merged lists branches that have been merged into the current branch. xargs git branch -d deletes branches listed on standard input. Be careful deleting branches listed by git branch –merged. The list could include master or other branches you’d prefer not to … Read more

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