Re: [git-users] .gitignore isn't ignoring.
On Fri, 2014-04-18 at 12:49 -0700, gordonle...@gmail.com wrote: > I've set intellij to ignore the three build files, but it too doesn't > appear to be ignoring it. .gitignore only impacts file which are untracked (that you've never added or committed). You can't ignore files that you've already told git are interesting to you, even if you later add them to .gitignore. > Changes not staged for commit: > (use "git add ..." to update what will be committed) > (use "git checkout -- ..." to discard changes in working > directory) > modified: build.number > modified: build.properties > modified: build.xml This means someone already committed these files to the repository, and you've now modified them. They cannot be ignored. If they were added to the repository by mistake (usually it's wrong to add these kinds of build products to the repository, but different groups do it different ways) then you have to run "git rm ..." to remove them from your current version of the repository. Then if they're recreated, .gitignore will start ignoring them. -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[git-users] .gitignore isn't ignoring.
I'm reading here: http://git-scm.com/book/en/Git-Basics-Recording-Changes-to-the-Repository 1) Do we put .gitignore at our working directory? I think so according to http://stackoverflow.com/questions/5698148/where-does-gitignore-file-belong *BUT, git isn't ignoring my files.* 2) I'm using intellij 12 and I'm trying to do a rebase. However, it says I first have to either stash or commit before I can do a rebase. If I uncheck the files that I want to ignore (see image), then it won't let me commit. I've set intellij to ignore the three build files, but it too doesn't appear to be ignoring it. Here's git bash: me@uc /c/code/portal (bugfix/PORTALS-21-xss-fixes) $ pwd /c/code/portal me@uc /c/code/portal (bugfix/PORTALS-21-xss-fixes) $ cat .gitignore build.number build.properties build.xml .gitignore .idea/* me@uc /c/code/portal (bugfix/PORTALS-21-xss-fixes) $ git status On branch bugfix/PORTALS-21-xss-fixes Your branch is up-to-date with 'origin/bugfix/PORTALS-21-xss-fixes'. Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git checkout -- ..." to discard changes in working directory) modified: build.number modified: build.properties modified: build.xml *[QUESTION#3: Why would git still list these when I have the above files in the .gitignore?]* Untracked files: (use "git add ..." to include in what will be committed) manifest.txt out/ portal.iml no changes added to commit (use "git add" and/or "git commit -a") Thanks, Gordon -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. <>