This writeup explains the different ways to add git ignore files and folders using the Git Desktop application.
Method 1- Manually adding folders and files to gitigonre file
Open Git Desktop and go to your desired repository where you need to add files/folders to the git ignore and commit the code. Then, right-click on File and add it to git ignore as depicted. Your file will be added to the git ignore.
Method 2 – Modify GitIgnore File Manually
Open and edit the gitIgnore file from the local folder location and add all files that you want to ignore and save it.
Method 3-Repository Setting
Open the GitHub and go to the Repository tab as illustrated.
You will get below screen where you have to go to Git.
Then write the folder or file that you want to add in the git ignore file as depicted below and click Save.
Hence, the wrrite up has described how you can add and ignore files/folders in git.