The command is
git ls-files -z | xargs -0 -n1 -I{} -- git log --since="90 days ago" -1 --format="%e {}" {} | sort > name.txt
I want to fetch file names from a git repo from last 90 days and store it in a file say, name.txt
.
How do I use this command in my script ?
Git.clone('https://github.com/visual-diff/visual-app.git','C:\visual_app')
path = 'C:\visual_app'
command='git ls-files -z | xargs -0 -n1 -I{} -- git log --since="90 days ago" -1 --format="%e{}" {} | sort > date.txt'
contentsArray=[]
f = File.open("C:\\visual_app\\date.txt", "r")
f.each do |line|`enter code here`
contentsArray.push line.chomp
end
f.close
print contentsArray