I have a bitbucket branch. when we tried to checkout the branch to sub-directory on jenkins server using jenkins job. it checked out whole repository everytime. it changes the timestamp of all the files rather than expecting to change the timestamp modified files only. kindly help in this regards.
Asked
Active
Viewed 265 times
0
-
can you please provide more details? talking about a fictitious repository and mentioning what commands you issue and what you expect to happen? – Cristian Bidea Mar 22 '19 at 08:29
-
I have a master branch,1. i did some modification in files and push the changes using git to my master branch. 2. Now i have a jenkins job which checks out the sources of branch to jenkins servers(OS: solaris). 3. it is expected to change only the timestamp of modified files but it is changing the timestamps of non-modified files also. command used in git: git status, git add . , git commit , git push. in jenkins jobs we have git & bitbucket plugins installed, jenkins just passing the git checkout -f last-commit-hash. – Vikas Sachchan Mar 22 '19 at 09:31
-
I think this SO answer might help: https://stackoverflow.com/questions/7415098/how-can-i-restore-only-the-modified-files-on-a-git-checkout – Cristian Bidea Mar 22 '19 at 10:26
-
I cannot reproduce your behavior. If a file does not change between older and newer commit, the file is not touched during checkout for me. I tried with git-1.19.0. Please provide full example how to reproduce it. Best would be get rid of the jenkins from it so that it can only be seen with local git. Please add you explanation to the post as edits so that it is clear without reading comments. – max630 Mar 23 '19 at 11:10