git configuration under Mac

Install the software environment:
1. Install git  
2. Install Xcode

to configure the git server environment:
1. Use the terminal to open the /etc/hosts file, and add the following information to it
     10.10.*.* test.server
2. Suppose the current user's directory is /home/zhangsan, open a terminal and execute the following commands
      a. ssh [email protected], generate a .ssh folder
      b. cp [email protected] ~/.ssh/
      c . touch ~/.ssh/config
      d. vim ~/.ssh/config,
             clip input: IdentityFile ~/.ssh/[email protected]
              Host 10.103.*
              Port ???

Fetch the code from the git server, switch to your working directory, and execute the following command:
git clone git@ test.server:~/repo/ios/projectname.git
Enter your project root directory and execute the following commands:
git submodule init
git submodule update
git config user.name 'Zhangsan'
git config user.email 'Zhangsan@163. com'

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326943367&siteId=291194637