Added ability to get the only the file name
BUG: Fix crash when doing a reset hard

Changing the index was causing issues because the commit which we were
going to set as the branch head commit was removed in the clean up.
This occurred when the the resetting hard over a very large amount of
commits. To fix this issue when updating we now fully clear out the commit
list and repopulate it as required with known commits and new commits.