HelloWorld
HelloWorld

Reputation: 4349

.gitignore file not working in Aptana 3

I'm having issues with Aptana 3. I can git clone a project from github. But my issue is that the gitignore file is not working properly. When I modify a file that is in the gitignore list, it still shows it in a modify or commit list.

If I do a git init through the console, the Aptana ui doesn't show file modifications. When I initialize it through the UI, then files that are modified show the asterisk when modified, but the gitignore file (preexisting from the github repository) is not working. Is there an easy way around this?

Thanks.

example in my gitignore file

config/database.yml

Modifying this file still shows enter image description here

Git status returns the following...

$ git status
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#       modified:   .gitignore
#
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#       modified:   Gemfile.lock
#       modified:   config/database.yml
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#       .project

Upvotes: 1

Views: 1786

Answers (3)

PDDM
PDDM

Reputation: 1

You may have to locally commit your .gitignore file in order to have Aptana ignore the files.

Just be careful to not push it to the origin.

Upvotes: 0

Mat Schaffer
Mat Schaffer

Reputation: 1704

You might have been bit by a problem that I just saw here. It looks like as of build 3.2.2.201208201020, if you open the commit window, then edit gitignore you have to restart Aptana before it will pick up the changes.

If you commit without restarting it will whatever is in the commit window regardless of what's in .gitignore :(

As for getting your file out of git, the following commands should help

cp config/database.yml config/database.yml.example # backup the file
git rm config/database.yml # remove the original from git
git commit -m "Untrack database.yml"

Upvotes: 1

Seth Robertson
Seth Robertson

Reputation: 31461

config/database.yml has already been committed. At this point .gitignore is no longer involved. .gitignore only applies to files not yet tracked by git. If you have custom modifications to files which you do not wish to share, see https://gist.github.com/1423106 for ways people have worked around the problem.

Upvotes: 3

Related Questions