Ankit Shah Ankit Shah - 2 days ago 3x
Git Question

Git Ignoring File from Adding to Server

I have local copy of my repository from Server. I have some files which i don't want to commit.

How to add that file in local to

? So once i push my data to server, that file not added


Since you already have a .gitignore file, all you need to do is edit it and add relative file paths (of the files that you don't want to commit) to it, one per line.

However, you might not want commit your .gitignore file, otherwise your file names, that you didn't want to commit, will be visible to everyone else.