I need to get file list from all branch where commit message contain bug id (eg. 1000 and 2000) can anyone help? Thanks
            Asked
            
        
        
            Active
            
        
            Viewed 1,290 times
        
    2
            
            
        - 
                    what did you tried? – Shivkumar kondi Jan 17 '17 at 13:14
- 
                    1You can find commits which have your bug Id ([here](http://stackoverflow.com/questions/7124914/how-to-search-a-git-repository-by-commit-message)) and than find files – Vasyl Zvarydchuk Jan 17 '17 at 13:18
- 
                    Add `--stat` to the linked question's accepted answer, and it will show the files touched by each matching commit. – Useless Jan 17 '17 at 13:24
2 Answers
5
            
            
        This command will show you all committed files into every commit with the message, containing Build-ID substring:
git log --graph --pretty=oneline --name-only --grep="bug_id"
 
    
    
        hamsternik
        
- 1,376
- 3
- 18
- 26
- 
                    allmost, this retrive files sepearate with commit id, how do i pu more the 1 bugId ? – user2290492 Jan 17 '17 at 13:47
- 
                    @user2290492 as I remember, you can use `|` syntax for grep equation, such as `git log --graph --pretty=oneline --name-only --grep="bug_id_1\|bug_id_2" ` – hamsternik Jan 17 '17 at 14:08
- 
                    
2
            go to the git initialized folder and execute the command.
 git show :/bug_id
bug_id in your case.
 
    
    
        Pavan
        
- 543
- 4
- 16
