1 install Git tool: sudoapt-getinstallgitgit-core2 create Git repository :( 1) mkdirFishMe (2) cdFishMe (3) gitinit function: Initialize Git repository, create. git directory ,. the git directory is the Git repository. (4) vim. add git/config: [receive]
1 install the Git tool:
Sudo apt-get install git-core
2. Create a Git Repository:
(1) mkdir FishMe
(2) cd FishMe
(3) git init
Function: Initialize the Git repository and create the. git directory. The. git directory is the Git repository.
(4) vim. git/config
Add:
[Receive]
DenyCurrentBranch = ignore
Function: allows the client to push (upload code to the. git repository) code.
(5) Add a file to the FishMe directory.
(6) git add
Function: add all files under the FishMe directory to The. git repository.
(7) git commit-m "comment"
Function: Submit
Note:
(1) openssh-server software must be installed on the Git server.
(2) The git directory is the Git repository.
(3) The Directory of the git directory is called the working directory.
(4) Ignore the command to add files or directories to the Git Repository: echo "file or directory">. gitignore
(5) use the Git repository to generate the working directory command: git clone. git repository working directory.