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

Accepted Answer
1 vote

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 Sign up to answer
Community showcase
Published an hour ago in Jira Ops

Jira Ops Early Access Program Update #1: Announcing our next feature and a new integration

Thanks for signing up for Jira Ops! I’m Matt Ryall, leader for the Jira Ops product team at Atlassian. Since this is a brand new product, we’ll be delivering improvements quickly and sharing updates...

33 views 0 3
Read article

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