small medium large xlarge

Generic-user-small
06 Apr 2013, 14:35
Louis Rhys (22 posts)

I tried setting up a git repository as suggested in Playtime of iteration A2, but there are some erb~ files gets checked in, e.g. “app/views/products/index.html.erb~” (in addition of “app/views/products/index.html.erb”).

Possibly this is a cache created by vim (the editor that I use). How to remove this from repository and ignore such files in the future?

Samr_small_pragsmall
06 Apr 2013, 14:46
Sam Ruby (584 posts)

To remove the files, use git rm.

To ignore such files in the future, edit your .gitignore file.

Once complete, commit your changes.

Generic-user-small
06 Apr 2013, 15:00
Louis Rhys (22 posts)

How to use .gitignore to ignore all such file?

Samr_small_pragsmall
06 Apr 2013, 18:40
Sam Ruby (584 posts)

Add a line that looks like this:

*~
Generic-user-small
07 Apr 2013, 04:57
Louis Rhys (22 posts)

Thanks! I can even do git rm *~ to remove those files that was added :)

  You must be logged in to comment