Skip to content

Instantly share code, notes, and snippets.

@zaqmor
Created October 22, 2018 18:59
Show Gist options
  • Save zaqmor/b25ca400c7790ac9948abcfcf7154aa6 to your computer and use it in GitHub Desktop.
Save zaqmor/b25ca400c7790ac9948abcfcf7154aa6 to your computer and use it in GitHub Desktop.
Git: Get SHA of file in index
git ls-files -s /relative/path/to/file/in/repo.ext
# SEE https://stackoverflow.com/questions/460297/git-finding-the-sha1-of-an-individual-file-in-the-index
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment