Commit a file in bin directory

I am using the SourceTree Windows beta, and I am trying to commit a file named "build.ps1" that is in a bin directory. I cannot for the life of me, get the file to show up in the commit window, even if I select "Show All". I dont have the bin directory in my .gitignore. Is there something special I have to do to commit this file?

1 answer

1 accepted

Up until there was a checkbox in the Setup Wizard that said 'Install a default global ignore file'. If you hadn't already configured a global ignore file, this was enabled by default. The intention was to help new git users avoid committing files they didn't need to, like exes and dlls.

Since the release we've realised this option wasn't quite obvious enough for people who never had a global ignore but also wanted to commit exes or files in Debug or bin directories (usually standard dirs you ignore in Visual Studio), so from this option is much more in-your-face.

Sorry you've fallen foul of this. The way to solve it is to go into Tools > Options > Git and click the 'Edit' button next to the 'Global Ignore List' field. You'll want to delete entries in there that you don't want, including 'bin'.

Hmm, selecting 'Show Ignored' definitely should show files ignored via any means, whether that's the global ignore or the local repository settings. I just tried it here on a couple of repos and sure enough the things that were excluded by the global ignore list popped up when I selected 'Show Ignored' (these repos had their own local .gitignore too but only had a couple of repo-specific entries).

FYI 'Show All' won't show ignored files though. It's the one thing 'All' doesn't include (which may not make sense linguistically, but it does practically :))

Okay, that explains it. Went into settings and looked at the global ignore, it does have bin files in it. Thats good thought, everything that is in that ignore list I normally want ignored. It doesnt look like the "Show Ignored" option shows files ignored by the global ignore though. Is it intended for it to work that way?

Just went back and verified, and with "Show Ignored" selected, it will not show the files. I was bale to use the command line "git add . -f" to commit them, so I have a work around, but im definatly seeing weirdness with stuff that is global ignored not showing, even in "Show Ignored" mode

Suggest an answer

Log in or Join to answer
Community showcase
Maarten Cautreels
Posted Thursday in Off-topic

Friday Fun: What's your favourite beer/drink

As a Belgian, beer-lover and home brewer, beer is one of my great passions. I love the fact that with just a few ingredients (usually just water, hop and malt) you can create so many different tastes...

285 views 38 9
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot