简体   繁体   中英

how to checkout git branches jenkins gui edits of last 5 days from master repo

Team,

I am trying to search for a string that was checked by a user by manually editing jenkins gui configuration . whenever we save this gui configuration, there is a direct commit to master on gerrit. Now, I want to search all the last 3 days of commits that happened to see who made that.

so when i do below, it takes for ever to download all days may be 30days of commits.

git clone ssh://git.team.com:29111/jenkins_configuration

is there a paraeter here i can say

--since 3d

such that it downloads only those commits and saves some time?

output:

Cloning into 'jenkins_configuration'...
remote: Counting objects: 204746,

expected output

Cloning into 'jenkins_configuration' last 3 day commits...
remote: Counting objects: xxx,

Using the Git command you can execute:

git clone --shallow-since=<date> ...

But if you are using the Git plugin on Jenkins you don't have the "shallow-since" parameter, only the "depth" one, so you need to choose a fixed number of commits (not days). It's equivalent to the following Git command:

git clone --depth <depth> ...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM