1

I have a repository (Git) with the code, I made a few commands push. But I forgot to do .gitignore file and now I'm in the repository files with the extension .pyc.

Is removing them manually give any effect? Is there any command?

mark
  • 653
  • 1
  • 10
  • 23

1 Answers1

0

Step 1. Add the files that you wish to ignore to the .gitignore

For example: ./*.pyc

Step 2 As stated here:

git rm -r --cached

The update would be visible the next time you push.

Community
  • 1
  • 1
Sohaib
  • 4,556
  • 8
  • 40
  • 68
  • Thank you. Is this command: "git rm -r --cached" delete all files with the extension pyc? – mark Jan 28 '15 at 09:00
  • This just deletes whatever files git has cached but are no longer tracked. You can have those files on your local system as long as you have a `.gitignore` that mentions the files that need not be tracked. – Sohaib Jan 28 '15 at 09:04