gogoWebsite

Using Git and the Git Client on the Mac

Updated to 1 hour ago

Go to the git website first:/download download and install
这里写图片描述

The git server here is emulated using the local virtual machine centos
Create a user named gitter, which will be used to specialize in git-related tasks.

adduser gitter
passwd gitter

For ease of operation you can turn on thessh password-free login

Switch to the gitter user

su gitter

Creating an empty library

cd /home/gitter
mkdir pro1
cd pro1
git init --bare 

git clientThere are many, here useFork
Menu File-"Clone
这里写图片描述
where the url is[email protected]:/home/gitter/pro1/

Add the file to the pro1 folder on the mac
Corresponding changes can be seen
这里写图片描述

这里写图片描述
这里写图片描述
Push the commit to the git server.
这里写图片描述
这里写图片描述

This completes the basic commit-push process.

------------------
Possible errors
Error 1: Client Tip
bash: git-upload-pack: command not found,
(Similarly bash: git-receive-pack: command not found, all fall into this category)

What is the reason? The original git server [192.168.1.61] on the git installation path is /usr/local/git, not the default path, according to the prompts, in the git server 192.168.1.61 on the establishment of soft links can be:

ln -s /usr/local/git/bin/git-upload-pack /usr/bin/git-upload-pack

Identification of other issues