Search code examples
gitmacossourcetreegithub-for-mac

Losing my .gitignore file with SourceTree


I am a SourceTree user. But today I installed the GitHub client on my Mac (in order to fork a GitHub project). It has created a mess in the repos I maintain.

All the local repos that I use and that are registered in my SourceTree application now shows the .DS_STORE files as files to be included.

What did happen? How can I fix that?

Here is the .gitignore_global file in my User directory:

#####
# OS X temporary files that should never be committed
.DS_Store
*.swp
*.lock
profile

####
# Xcode temporary files that should never be committed
*~.nib

####
# Objective-C/Swift specific
*.hmap
*.ipa

####
# Xcode build files
DerivedData/
build/
Builds/

#####
# Xcode private settings (window sizes, bookmarks, breakpoints, custom executables, smart groups)
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
!default.pbxuser
!default.mode1v3
!default.mode2v3
!default.perspectivev3

####
# Xcode 4
xcuserdata
!xcschemes
# Xcode 4
*.moved-aside

####
# XCode 4 workspaces - more detailed
!xcshareddata
!default.xcworkspace
*.xcworkspacedata


####
# Xcode 5
*.xccheckout
*.xcuserstate

####
# Xcode 7
*.xcscmblueprint

####
# AppCode
.idea/

####
# Other Xcode files
profile
*.hmap
*.ipa

####
# CocoaPods
# Pods/

####
# Carthage
Carthage/Build

And here is the .hgignore_global file in my User directory too:

syntax: glob

*~
.DS_Store

PS: Strangely, this does not happen for all the repos (but let's say for 75% of them)


Solution

  • The problem disappeared as suddenly as it appeared...