Server installation (Ubuntu as an example)
Installer:
sudo apt-get install git
Initialize Git repository:
first select a directory as Git repository, assuming /srv/sample.git, enter the command in the /srv directory:
$ sudo git init --bare sample.git
will generate sample.git.
tip: Please give proper permissions to the /srv/sample.git/ directory so that git users can read and write the directory.
Disable shell login (this step can be omitted):
For security reasons, git users are not allowed to log in to the shell, which can be done by editing the /etc/passwd file. Find a line similar to the following (if the user is git):
git:x:1001:1001:,,,:/home/git:/bin/bash Change
to:
git:x:1001:1001:,,,:/home /git:/usr/bin/git-shell
client use:
eclipse right-click team menu or
clone a repository with the following command git clone <user>@server:/srv/sample.git
Note: the user must be a linux user.
Update: git pull (from remote)
after modification:
git commit (commit locally)
git push (push to remote)
git build and use notes
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=326270497&siteId=291194637
Ranking