As funny is it sounds, you can most definitely hide your files in a git folder...
Although this in not an ideal way of hiding files with git (and is not recommended for hiding sensitive documents), it is also a cool way of keep others from seeing your files, or knowing the exist.
Before doing this, you should be sure you have git bash installed.
To begin, open your terminal/command prompt and navigate to the directory you want to work on.
PermalinkInitialize a git repo
git init
Make sure you are in the right directory
PermalinkCreate a new branch
git branch <new name>
PermalinkSwitch to the new branch
Now you have to switch to the new branch
git checkout <branch name>
PermalinkAdd all your documents
You can now add the files you want to this directory like you normally would
PermalinkTrack the new files with Git
Make git aware of your files and track the changes
git add .
PermalinkCommit you new documents
At this point you will now have to commit(save) the files to git with a message
git commit -m <message>
PermalinkSwitch to old branch
you can now go back to the old branch that does not have your files
git checkout <branch name | master>
PermalinkNow your files are successfully hidden ๐๐๐.
To view your files, switch to the branch that contains the files with
git checkout <branch name>
To learn more about git and git bash commands checkout sites
- git docs - https://git-scm.com/doc
- git explorer - https://gitexplorer.com/
Feel free to do more. HAPPY CODING