This post is about protecting your privacy in Github. These files or folders might contain sensitive information like passwords, invoices or work plans. To do this we create a brand new file called .gitignore. That’s dot gitignore. It is just a text file. We create this text file and type in the list of folders and files that we want to protect.
Suppose you have a folder called private and a file called webpasswords.txt and you want to protect these from prying eyes. Your .gitignore file will look something like the following. Directories (folders) are preceded by a slash.
/private webpasswords.txt
If you are working on a Windows Presentation Foundation (WPF) project you could try the following gitignore sample. You can create the gitignore file in Windows with Git Bash. You can start Git Bash in the folder and then at the command line you can run touch gitignore.