Some git tips to survive in versioning world – Part 1

I am gonna talk about Git. We all somehow use git and thus it is important for us to better use .gitignore.

How to allow only certain files of a repository on git commit?

To deny all and allow few, we can use “!”.

# Ignore all with * and ! to not to ignore /
*
!/
# Allow only NewFolder and it's contents
!NewFolder
!NewFolder/*

Remember to change the “.gitignore” file before committing all the files.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.