Is there any way to verify the line endings for a file in the git repo? If I checkout then the working directory can be influenced by core.autocrlf or .gitattributes, etc.
Is there anything like "svn get" that doesn't checkout but simply copies a file from the repository to my local filesystem somewhere (assuming this ignores any line ending conversion settings)?
If I checkout then the working directory can be influenced by core.autocrlf or .gitattributes, etc.
yes, it can.
Is there anything like "svn get" that doesn't checkout but simply copies a file from the repository to my local filesystem somewhere
You can ask for a git archive of a repo: that is the files of a given commit compressed in an archive (zip or tar).
Some hosting services propose just that (like GitHub and its Download ZIP
button)
When you uncompressed such an archive, no eol is modified at all (it isn't a git repo, just a collection of files).
来源:https://stackoverflow.com/questions/25697254/verify-line-ending-in-git-repo