top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Listing all the branch that contains commit title is "xxxx yyyy" in GIT

0 votes
380 views

How to list all the branch that contains commit title is "xxxx yyyy" note: the commit-id is not the same though
the commit content is the same in different branch

posted Jun 4, 2013 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

I think that

git log --all --no-walk --grep="xxxx yyyy"

does what you want.

answer Jun 6, 2013 by anonymous
Similar Questions
+1 vote

When run that command immediate after "git bisect start" somebody sees the full commit range as defined in "git bisect start".

However running that command later after few git bisect steps" somebody is just presented with the remaining commit interval. Is this intended ?

+2 votes

In our current setup, we have automatic tagging in git of all successful release builds. This makes it easy to go back to stable points in history and compare functionality, check when bugs were introduced etc.

To help with this process further, it would be useful to be able to use git bisect, but as these are just a sequence of tags, not commits on a branch, git bisect will not work as is.

Is there any tooling for automatically recreating a branch from a sequence of tags, where each generated commit is the calculated delta between each two neighboring tags?

+2 votes

In coreboot we try to check for whitespace errors before committing. Of course a pre-commit hook is the way to go, but unfortunately it is not so simple (at least for me) as the following requirements exist.

  1. Only the files actually committed should be checked. That means running git commit -a, abort that and then running git commit some/file should only check some/file for whitespace errors.

  2. There are certain files that are allowed to have whitespace errors. In our case these are *.patch and *.diff files which by design seem to contain whitespace error.

Currently the whole tree is checked, which takes a lot of time. I tried to come up with a patch, but failed so far. Best would be to have

$ git diff --check --only-committed-files --exclude "*patch$"

where I could not find a way for the last to switches.

Currently, I would use

$ git diff-index --cached --name-only $against -- | grep -v patch$

and pass that list to some whitespace check program. Unfortunately that still does not fulfill the first requirement. What am I missing to solve this elegantly?

0 votes

I am trying to setup a repository for use inside the LAN, but I have been unable to checkout any branch so far. I am very new to git.

The repository is being served from gitblit over https. I have GIT_SSL_NO_VERIFY=true. The repository was created from git svn.

git ls-remote

shows the remote branches, e.g.:

... refs/remotes/2.0.3
... refs/remotes/trunk

git branch -r

shows none of the remote branches.

git checkout -b new-2.0.3 origin/2.0.3

produces:

fatal: git checkout: updating paths is incompatible with switching branches.
Did you intend to checkout 'origin/2.0.3' which can not be resolved as
commit?

What does that mean? I get the same result after each of these:

git fetch    
git remote update
git fetch

git add remote stage-repo https://example.com:8443/git/blah-tools.git
git fetch stage-repo
git checkout -b new-2.0.3 stage-repo/2.0.3

Can someone explain what the error message means, and what I am doing wrong?

...