jgit - How do I add an unchanged file to git index -
i writing tool has keep history of (generated) files in git repository. one of requests must able take whatever generated in specific commit , replay branch. on surface, looks cherry-picking, there nuances make little bit different. each commit generates set of files working tree. files may exist in working tree, , quite often, generated content unchanged version in working tree. at later time, must able take list of files generated previous commit (regardless whether content changed or not) , copy branch. my first question is: can add file git index (and commit) if content has not changed? if have muck around git internals that, still okay. need sure not break git repo other git tools. i using java , open source jgit library interacting git repository, second question is, if possible in jgit if yes, api pointers appreciated. thanks. to answer explicit question - if file existed in previous commit, , content has not changed @ (although metadata may have)...