Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Yesterday I was trying to get .DS_Store files to be globally ignored by git.

I must have entered some command incorrectly because now every time I launch terminal or use the cd command, I get six lines of -bash: .DS_Store: command not found, like so:

[11:28:30] [~]$ cd Projects/
-bash: .DS_Store: command not found
-bash: .DS_Store: command not found
-bash: .DS_Store: command not found
-bash: .DS_Store: command not found
-bash: .DS_Store: command not found
-bash: .DS_Store: command not found
[11:28:33] [Projects]$

Obviously, DS_Store is not supposed to be a command.

How do I fix this?

Thanks.

EDIT:
I don't remember exactly every command I ran. I was googling, and trying stuff. I know I did execute the commands found here.

git config --global core.excludesfile ~/.gitignore

echo .DS_Store >> ~/.gitignore

EDIT 2: I figured it out. Answer provided below.

share|improve this question
    
What steps did you take to get git to ignore .DS_Store files? –  fideli Jan 5 '12 at 16:39
1  
@Pitto No. Please don't suggest that. The question is perfectly on-topic here. If a question about an Apple product is on topic for Super User as defined in the the FAQ, then it should stay on Super User. –  slhck Jan 5 '12 at 16:41
    
What is the content of your ~/.bashrc and ~/Project/.git/config file? Did you create a .gitignore file? Show them all please. –  Herman Torjussen Jan 5 '12 at 16:42
    
What does history show? Can you tell us what you did using the history output? Did you ever change ~/.bashrc or ~/.bash_profile? –  slhck Jan 5 '12 at 16:42

1 Answer 1

I figured it out. At some point I ran echo .DS_Store >> ~/.rvmrc a couple times. My .rvmrc file looked like this:

export rvm_path="/Users/myname/.rvm"
.DS_Store
.DS_Store

I removed the two .DS_Store lines and everything is behaving properly.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.