Step 1: Initialize the Repository by right clicking Git Bash Here in the Repository/Git directory

Figure 1

Git init –bare shared. Git

Figure 2

The following figure shows that the initialization is successful. === Developer 1 operation

Step 2: copy the warehouse to the local command: git clone/D/git/git/Repository/git/Shared git. (pay attention to a point, which indicates that the current directory)

Figure 3

 –system: operates the /etc/gitconfig file: contains values that apply to all users and libraries in the system.  –global: operates ~/. Git config file:  default: operates the repository. Git config user.name user1 git config user.email [email protected]//

Figure 4.

Hidden files can be seen with the ls -al command. As shown in the figure below.

Figure 5

Go to the. Git folder and view the configuration file. Command: cat congfig

Figure 6.

Step 4: Ignore documents that do not require version control: echo “*. TXT” >.gitignore

Step 5: Create a new file: echo “User1 add content” > index.txt

Figure 7.

Check whether the IP address is added successfully.

Figure 8.

Git add index.txt

Figure 9.

Command: git commit

Figure 10.

Command: First line add: Bruceou add the file Save and exit, as shown in the following figure.

Figure 11.

Step 7: Commit your repository to a public server: git push Origin master

Figure 12

= Developer 2 action ==

Step 8: copy the warehouse to the local command: git clone/D/git/git/Repository/git/Shared git. / / local clone command: Git clone [email protected]: Ouxiaolong/Smart_Home. Git / / remote clones

Figure 13

Git config user.name “user2” git config user.email [email protected]

Figure 14

Step 10: Ignore documents that do not require version control: echo “*. TXT” >.gitignore

Step 11: Create a new file: echo “User2 add content” >> index.txt

Figure 15

Git add index.txt

Figure 16

Git commit -m “Ouxiaolong add the file!”

Figure 17

Step 13: Commit your repository to a public server: git push Origin master

Figure 18

To check the status, run git status

Developer 1 Operation == Step 14: Download the latest server data git pull