I have a Jenkins Pipeline setup with my bitbucket repository. Earlier that repository has lots of files which include jar files now I have deleted some of the jars and push it to my bitbucket branch now when taking a pull which includes the .git file which is having huge files inside the object folder, due to which whenever I run my Jenkins build am getting timeout because my repo take 30 to 40 min of time and the Jenkins timeout is 10 min. I want to reduce the size of .git folder without interrupting my previous build
Asked
Active
Viewed 433 times
0
-
try the solutions mentioned here - https://stackoverflow.com/questions/24493071/how-to-reduce-git-repo-size-on-bitbucket – Pankaj Saini Sep 23 '20 at 10:50
1 Answers
0
Try to use a shallow clone of your git repository: git clone --depth 1
Then only the last revision will be cloned and not the whole history (which still contains the "deleted" jar files).

Johannes Stadler
- 737
- 12
- 24
-
That would clone the repo in local with few histories metadata, but that repository would still contain that much data correct and because of that whenever jenkins try to clone from that repo it get timeout – Raj Singh Sep 29 '20 at 09:54