What is .gitkeep in Git? Plus an example.

Veröffentlicht am: 13 September 2020
auf dem Kanal: Cameron McKenzie
5,717
69

Have you seen the .gitkeep file in a folder or two and you're wondering what .gitkeep has to do with Git? Well, Git will not include empty folders in a commit, and as such, empty folders do not get pushed to GitHub or GitLab servers. But what if you want git to push an empty directory to GitHub? Well, the convention is to put a file named .gitkeep in the empty directory, then Git thinks the folder is being used, and it gets included in the push. It's worth noting that .gitkeep is not part of the tool or part of Git standard. It's kinda like the hidden menu at In and Out Burger - lots of people know about it and avid users certainly use it, but it's not officially supported or documented. So there, you go. Watch the video to learn more about what .gitkeep is and how to use it with Git and an empty directory or empty Git folder.


Auf dieser Seite können Sie das Online-Video What is .gitkeep in Git? Plus an example. mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Cameron McKenzie 13 September 2020 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 5,717 Mal angesehen und es wurde von 69 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!