I need to create an archive of my Git project, ignoring and leaving out files specified by .gitignore
, but including the actual .git
repository folder. Simply running git archive master
leaves out the .git
folder.
Is there a way to make git archive
include the .git
folder but still ignore files specified by .gitignore
?
.git
folder alone and later checkout HEAD to get your files. Or you simply transfer it by fetching from it as a remote repository.