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

This widget could not be displayed.

Up until 0.9.0.2 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 0.9.0.3 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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted yesterday in Canada

AUG Lunch Roundtable - August 13 - Highlights

Thanks to everyone who came out today for the lunch AUG - we had some great food and discussion (and ice cream sandwiches to fend off the heat!) The welcome and fun fact was great as well, what an aw...

30 views 1 3
View post

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