4

Believe it or not, I'm new to Github.
I only want to commit the main project files to my branch (not all the automated files that occurred when I exported the project)
question - how do I safely get rid of the visible list of "changed files" that I don't want to commit? Can I just "discard changes", or does this actually do something to the files?

I selected "ignore all XXX selected files (add to .gitignore)" but it has neither added to gitignore nor removed them from the list.

I mean, I could just leave these files in the list of "Changes"...but my OCD doesn't like a list of files in my face.

Comments
  • 5
    Try making your own gitignore

    You just need a normal text file in the root of the git repo named ".gitignore" and then you can write entire patterns of ignored files there e.g.:
    ".idea" would ignore the entire .idea folder

    And "*.o" would ignore every file ending in the .o extension

    Your git IDE should reflect the changes to gitignore, but if it doesn't try restarting
  • 6
    @Hazarth Thanks. I actually already had a gitignore file...but I hadn't uploaded it to the main root :S

    Ahhhh, that's better :D
  • 2
    @ojt-rant enjoy the benefits of git!
  • 0
    Flutter....
  • 1
  • 0
  • 0
    Did you already commit those files. If so you will also need to remove them from cached files as adding gitignore won’t fix previous extra commits and it will keep tracking changes
  • 0
    @rov3rand0m no. they are only ticked because I clicked "select all" to see what options I had.
Add Comment