Xcode comes with git usage records and xcode comes with git records
I. Two Methods for creating. git files1. When creating a Project, if you select Create git repository, you can see the hidden. git file..
How to view hidden files: (1) Enter defaults write com. apple. finder AppleShowAllFiles TRUE on the terminal; (2) Enter killall Finder.
2. Download Command Line Tools in XcodeIn this way, even if you do not selectCreate git repository, or you can Create a. git file later (Xocde ---> prefrences --> Downloads download ).
The method for creating a. git file is as follows: (1) Open the terminal and enter "cd/Users/.../Project, that is, enter the directory of the Project you created (2) git init. This is the. git file. (3) git add.Do not omit "." In this line of instruction. There is a space between it and add. In this way, all contents in the current directory are added to the. git file (4) git commit-m "Initial commit", which will save the changes permanently.
Finally, restart Xcode and open Source Control. You will find that you can use all menu items that are not available.