0

I worked in a project for more than 4 months and used GIT for repo. 4 members in the team has feature branches and they do PR from other branches. What I want is list of CSS files(with full path) which I worked in the branch or project from beginning of the time (i.e 4 months ago).

I tried git diff --name-only <beginnig-of-branch-name> but it does not work. Please help.

Senthil
  • 444
  • 1
  • 10
  • 23
  • Can you please show an example of the output you're trying to get and explain why the command you've shared gives insufficient output? – Mureinik Mar 08 '16 at 07:39
  • @Mureinik Example, scenario 1:I edit the file src/namespace/my_bundle/resources/css/styles.css on Sep'2015 in a feature branch and it is merged to master. scenario 2:I edit the file src/other_namespace/my_bundle/resources/css/styles.css on Oct'2015 in a feature branch and it is merged to master. Like wise I worked in CSS file for more than 4 months and all are merged to master. But now I need the list of CSS files which I worked under the repository. From above scenario, list of files are. -src/namespace/my_bundle/resources/css/styles.css -src/other_namespace/my_bundle/resources/css/styles.css – Senthil Mar 08 '16 at 08:27

1 Answers1

1

You should be able to filter the log by author:

git log --no-merges --stat --author="Pattern" --name-only --pretty=format:"" '*.css'

(on Windows, use double quotes for the file extension filter: "*.css")

Replace "Pattern" by your author name.

Example:

vonc@voncp C:\Users\vonc\prog\git\git
> git log --no-merges --stat --author="Junio.*" --name-only --pretty=format:"" -- "*.txt"
Documentation/RelNotes/2.8.0.txt

Documentation/RelNotes/2.7.1.txt
Documentation/git.txt

That would list all contribution to txt files made by Junio C Hamano.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks @VonC The command listing few files only. Do this command list files even it is merged in master? I would like to list all the files I edited in master branch which is merged from my feature branch. – Senthil Mar 11 '16 at 08:22
  • `git merge-base my_feature master`..master – VonC Mar 11 '16 at 08:29