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

Commit a file in bin directory

Xavier Zwirtz March 20, 2013

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

1 vote
Answer accepted
stevestreeting
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.
March 20, 2013

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'.

stevestreeting
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.
March 20, 2013

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 :))

Xavier Zwirtz March 20, 2013

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?

Xavier Zwirtz March 20, 2013

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
TAGS
AUG Leaders

Atlassian Community Events