Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,558,564
Community Members
 
Community Events
184
Community Groups

Why is my Ignore... option greyed out when I right click a file?

Sourcetree is ignoring my global .gitignore file so I'm trying to get it to ignore an individual file by right clicking it and selecting Ignore... The problem is that the Ignore... option is greyed out. Can anyone tell me why?

Thanks

6 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

35 votes
Answer accepted
KieranA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Apr 03, 2013

Hi Randall,

You have to stop tracking the file before you can ignore it. You can simply right click on the file and hit "Stop Tracking". If you're in Git and you've got the staging view you should be able to right click on the same file (provided it has a blue question mark icon) and click "Ignore". If you're using Mercurial you'll need to commit the removed file first and it'll then re-appear as an uncommitted change from which point you can right click on that file and click "Ignore".

Above is a screenshot of the state you need to get your file into in order to ignore it.

Hope that helps

Thank you Kieran! Worked for me!

File jumps up to the "Staged Files" window when I" Stop Tracking".

Like # people like this

Thanks - very helpful. Btw - could be nice to have a feature like detecting what kind of project is that and popup (apply default ignore pattern?) for most popular tools.

Stop tracking is also greyed out. Adding in the settings under diff pattern also doesnt work

Strange thing, i need to stage it first, then i can stop tracking it... What is that for weird behavior?

 

well still not, then it jumps back to unstagged files... what is this for shit

Same as Ronaldo, I never got the blue question mark and couldn't stop tracking a file (I wanted to ignore .gitignore to maintain a custom version in my working folder without overwriting the repo .gitignore)

I ended up fixing the issue from the console following the accepted answer @ http://stackoverflow.com/questions/20525055/how-to-ignore-existing-file-in-git-using-source-tree

Short version:

git update-index --assume-unchanged .gitignore

That did not work for me. Stop tracking and the file moves to the other box but still no question mark icon. Cannot ignore. Also, My ignore file is ignored for the repo. Why is that?

File jumps up to the "Staged Files" window when i Stop Tracking.

Like CS likes this

Too late - but thank you anyway...

What's the difference between "stop tracking" and "add to gitignore"?

-> .gitignore file will be transmitted to the git repo, and the other developers will get it with the new entries to ignore?

-> "stop tracking" will only be applied on the client-side - so no distribution to the git repo?

thank you for your feedbacks.


regards, jan

I had to close and re-open the tab for a repo to make the "ignore" option appear on right click for the question mark files. Closing and re-opening SourceTree did not work.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events