• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

I Like Kill Nerds

The blog of Australian Front End / Aurelia Javascript Developer & brewing aficionado Dwayne Charrington // Aurelia.io Core Team member.

  • Home
  • Aurelia 2
  • Aurelia 1
  • About
  • Aurelia 2 Consulting/Freelance Work

Fixing The Issue of Atlassian Sourcetree for Mac/Windows Ignore .gitignore Directives

General · July 9, 2014

I have recently switched over from command line GIT to Atlassian Sourcetree because I like to see what is going on, makes things like branching and selective commits a whole lot nicer as well.

One issue I encountered was files set to be ignored in my .gitignore file were still showing up in the working copy when modified even though when looking via the command line, you see they’re being ignored.

The Issue

In my case the problem was I was trying to ignore files that were previously not ignored. I had some generated Javascript being compiled from Gulp.js that I was previously committing, I added my ignore directives AFTER the fact.

In the eys of Sourcetree, changes are still showing up and being commited because even though you’re now ignoring them, GIT and Sourcetree still think they’re important.

The Fix

Remarkably simple. You just need to right click on the file(s) you want to ignore and click, “Stop Tracking” this will stop the file being tracked, but keep it locally on your machine.

Just make sure you have all of the files you’re untracking added to your .gitignore file or you’ll still see them.

Dwayne

Leave a Reply Cancel reply

1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Benjamin Intal
Benjamin Intal
7 years ago

Works great! Creating the .gitignore file AFTER some commits was indeed the source of the problem.

0

Primary Sidebar

Popular

  • Testing Event Listeners In Jest (Without Using A Library)
  • Handling Errors with the Fetch API
  • Thoughts on the Flipper Zero
  • Waiting for an Element to Exist With JavaScript
  • How To Paginate An Array In Javascript

Copyright © 2023 · Dwayne Charrington · Log in

wpDiscuz