How to list branches that contain a given commit?

From the git-branch manual page: git branch –contains <commit> Only list branches which contain the specified commit (HEAD if not specified). Implies –list. git branch -r –contains <commit> Lists remote tracking branches as well (as mentioned in user3941992’s answer below) that is “local branches that have a direct relationship to a remote branch”. As noted … Read more

How do I migrate an SVN repository with history to a new Git repository?

Create a users file (i.e. users.txt) for mapping SVN users to Git: user1 = First Last Name <email@address.com> user2 = First Last Name <email@address.com> … You can use this one-liner to build a template from your existing SVN repository: svn log -q | awk -F ‘|’ ‘/^r/ {gsub(/ /, “”, $2); sub(” $”, “”, $2); … 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

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