Lesson: private enterprise to build Git server .docx
Course Outline:
- GIT remote communication protocol detailed
- WEB-based management services to build gogs
A, GIT server set up ways
A lesson we talked about GIT is a distributed version control system, since it is distributed so will certainly involve telecommunications , then what is the use of GIT remote communication protocol it?
git supports four communication protocols:
- Local (local agreement)
- ssh
- http(Dumb、Smart)
- git
1, Local (local agreement)
Based access to the local file system or a shared (NFS) file system,
Advantages: simple, direct use existing file permissions and network access.
Cons: This protocol flaw is itself a shared file system limitations, only the LAN.
Match the scene: small projects makeshift version of the service.
l demonstrate local protocol used:
# Atals local directory on the clone project from f / git /
git clone /f/git/atals/
# Even the bare warehouse can normally download
git clone /f/git/atals.git
# Cloning projects based on local file protocol
git clone file:///f/git/atals/
If at the beginning of the URL explicitly specify file: //, then Git behavior will be slightly different. If you only specify the path, Git tries to directly copy all the files needed. If you specify file: //, Git will trigger a process usually used for network transmission of data, is transmitted by the packaged file gc processing, saving more hard disk space.
Go to the init --bar luban.git
git add -A;git commit -am'1 commit';git push
===============================
References: