What are the differences between .gitignore and .gitkeep?

.gitkeep isn’t documented, because it’s not a feature of Git. Git cannot add a completely empty directory. People who want to track empty directories in Git have created the convention of putting files called .gitkeep in these directories. The file could be called anything; Git assigns no special significance to this name. There is a competing convention of adding … Read more

How do I create a folder in a GitHub repository?

TL;DR Use / in the file name field to create folder(s), e.g. typing folder1/file1 in the file name field will create a folder folder1 and a file file1. Original answerYou cannot create an empty folder and then add files to that folder, but rather creation of a folder must happen together with adding of at least a single file. This is because git doesn’t track empty folders. … Read more

Meaning of the GitHub message: push declined due to email privacy restrictions

The remote repository has been configured to disallow you pushing a commit that would reveal your personal e-mail address. For example in GitHub you have checked the Block command line pushes that expose my email checkbox to enable this. While you can of course uncheck that setting, it will expose your private e-mail address to everyone in the … Read more

Git push results in “Authentication Failed”

If you enabled two-factor authentication in your Github account you won’t be able to push via HTTPS using your accounts password. Instead you need to generate a personal access token. This can be done in the application settings of your Github account. Using this token as your password should allow you to push to your … Read more