A little later, my wife joined me in working with those projects only to discover that under certain scenarios we could never actually merge or sync the branches from XCode. There were always couple files that would be "uncommited" in XCode. Nasty XCode project state files.
I had not worked with Git before this actually, so after reading up a bit about project files and the like and how a ".ignore" file would do the trick.
After I little bit of struggling, I realized that for ignore to work, the files needed to be removed from the repository first. Thankfully I did not have any important history so I could simply recreate them. You can also remove them from git with: git rm --cached
To go about creating, editing configuring a global ignore file on OSX I did the following:
First problem on a Mac, any "." files are seen as system files and those are automatically hidden from you.
To get around that open "Terminal" and use the commands below to show and hide system files (you'll need to either restart or force quit Finder for the changes to take effect).
Show:
defaults write com.apple.finder AppleShowAllFiles -bool true
Hide:
defaults write com.apple.finder AppleShowAllFiles -bool false
Once I had done that I simply went searching for a couple example ignore files and combined them into the example below.
Create a file in your user directory called ".gitignore_global", populate it with the contents required, (below is mine, that does take care of the XCode problem files)
Then in Terminal run:
git config --global core.excludesfile ~/.gitignore_global
My global ignore file:
So what kind of version control do you use these days?
ReplyDeleteThanks!
ReplyDeletevery informative and knowledgeable
ReplyDeleteLiên hệ Aivivu, đặt vé máy bay tham khảo
ReplyDeletevé máy bay đi Mỹ khứ hồi
mua vé máy bay từ mỹ về vn
có chuyến bay từ nhật về việt nam chưa
vé máy bay từ frankfurt đi hà nội
từ canada về việt nam quá cảnh ở đâu
dat ve may bay tu han quoc ve viet nam
chi phí vé máy bay cho chuyên gia nước ngoài