Daniel
Daniel

Reputation: 16226

git - removing rails development log

I keep getting the changes made to my development.log in my git repository. My .gitignore file has:

log/*.log
tmp/**/*
doc/api
doc/app

So I need two things to happen.

  1. Get the development.log file out of my current commit (its now too big for the server to receive)
  2. Make sure that it doesn't get back in there.

Any suggestions?

Upvotes: 7

Views: 3270

Answers (2)

Paul B. Hartzog
Paul B. Hartzog

Reputation: 21

you can stop tracking the file using 'git rm --cache '

take a look at gitref for details

Upvotes: 2

Pod
Pod

Reputation: 4129

$ git rm log/development.log
$ git commit -m"log too big for the server to receive"

An ignorefile won't ignore files that are in the repo, so once development.log is removed everything should work as you expected.

Upvotes: 14

Related Questions