I just started to configure a new OS X workstation, and after installing Sourcetree and cloning our repo, without doing anything else then cloning the repo, Sourcetree sees some deleted binary files (that yes, did exists at some point in the project) and place them as unstaged.
I though no problem, let's just stage them and they'll go away, theses are deleted files. Trying to stage them gives me this result:
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree rm -q -f -- file.jpg fatal: pathspec 'file.jpg' did not match any files Completed with errors, see above
So they stay in unstaged, I can't stage them. Trying to discard or remove them gives me the same error.
Is there anyway I can have them go away
EDIT FOR SCREENSHOT
Screen Shot 2015-03-31 at 2.08.50 PM.png
I notice that it looks like all the filenames have accents in them. Can your Mac's OS support filenames with those characters?
We have noticed that if attempt to clone a repo onto a workstation which doesn't support some of the filenames, it will show them as pending deletions (although that usually causes them to be staged - so it doesn't seem exactly like what's happening here).
Since these are just (showing up as) unstaged files that you don't wish, is the only real harm that they are cluttering up your list of unstaged files? Can you just add them all to .gitignore?
I'm on Mavericks, so I can't see why it wouldn't support accented characters... Unless putting the OS in english makes it unable to process them? That'd be silly, but still... And yes, putting them in .gitignore will be a solution, but I wanted to check if there was something else to do before ;-)
Hmm, I seem to be able to create files with accents on my Mac and to commit them to a git repo, so that doesn't seem to be it. I can't shake the feeling that it could be somehow related, though. If you do a git checkout of a commit that should have those files present, do they appear?
I'll be damned. They *are* in the repo over at bitbucket. I'm in a develop branch, it's the one I checked out locally also. Files are on the remote repo, but not locally. I can't ignore them on Sourcetree and trying to show in finder won't open either. Although, it sure has to do with accented character. I used the "copy path" to manually edit the .gitignore file and it comes up like this: Epices-moi-Gambas-pe^ches-5-150x150.jpg. As you can see, the accent is not placed correctly. And adding the files manually to the .gitignore just won't cut it either...
Do you want the files to be present in your next commit or not? Right, if the files are present in the branch and being tracked you can't ignore them. I'm not sure whether its the OS, git, or SourceTree that's choking on the filenames. Do the files show up in your working directory on the local clone? I'm kind of guessing not. This may be kind of English-speaker-centric of me, but I think the best solution is to change the names of the files so that they do not contain accents. In order to do this, you'd need to clone the repo somewhere that supports the character set and then rename the files with git mv and recommit. We had a very similar problem with Windows users trying to clone repos that contained files whose names ended in a period (which Windows appears to not tolerate). The only difference was that there they showed up as staged deletions.
I added some more filenames with different accented characters to my test repo and had no problem adding them to Git, pushing them to Stash, and pulling them back down again with SourceTree. Not sure why exactly you're having this problem but somewhere in your chain something must be having difficulties with the names. What happens if you clone this repo: https://bitbucket.org/timcrall/accented-chars.git Also, maybe try taking SourceTree out of the mix and using git command lines to clone the repo to your Mac and then do git status to see what's there?
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...
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!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG