What is a remote repository?
As described in chapter 1, remote warehouses can store all source code and resource files you have written.
It can even be used as a network disk, but of course there are many features that fit the GIT management text.
The following describes how to use GitHub as an example remote repository. (You can also
rw+ = your-name repo @repos_a rw+ = @team_a r = @all NBSP; repo @repos_b rw+ = @team_b
This configuration is very simple, the first definition of the two repository group, and then define the two user Group,group the benefit is to add repository and user later, do not need to be configured separately, just add to the corresponding group.
Add the new
Article Directory
1. git fully resolved remote repository interaction
1.1. The concept of a central warehouse
1.2. local branch and remote branch
1.3. Pull and Fetch
1.4. about Donations
The concept of git-fully-resolved remote repository Interaction Central WarehouseAl
/e2fsprogs.gitGit: // gitorious.org/tinylab/pleac-shell.gitGit: // git.kernel.org/pub/scm/linux/kernel/git/clrkwllms/rt-tests.git...More than a dozen personal warehouses are omitted here
Now we can use scp to copy the repository_file file and the following script to the newly installed computer (scp repository_file clone. sh bkjia.com@192.168.2.110:/tmp/) and then run clone directly. sh (. /clone. sh!
#! /Bin/bash# (C) 2014 Yunlong Zhou # Under licenc
The recent use of git has made it possible to realize the advantages of GIT in branch management and offline development, which can create different branches for different tasks in the local repository. When your repository is in SVN type, if you want to use
GitHub is a remote repository that hosts open source code for free. But for some source code such as the life of the business company, neither want to open source code, but also reluctant to pay for the protection of GitHub, then you can only build a git server as a private warehouse use. Building a git server requires a machine running Linux and is highly recomm
. The remote repository is similar to the current network on the remote host, but with the functionality of Git, you can save our code base on the host. GitHub here is the remote repository.First of all, we need to use the remote repository now GitHub registered account, how to register not much to say.Then we need to create
git, in fact, I began to contact early, and began to understand some knowledge, and then developed with the development of tools to the remote push code, but found that they do not know much about git, they do not work hard, a day of conscience found, feel sorry friends to provide information and help, so they spent a few days, The git command, from the
clones a copy from this "server" warehouse to his computer, in addition, they push their respective commits to the server warehouse and pull others' commits from the server warehouse.
You can build a server to run Git on your own. However, at this stage, it is absolutely difficult to build a server to learn Git. Fortunately, there is a magical website called GitHub in this world. It can be seen from its na
The previous section mentioned the concept of the warehouse, in fact, after initializing git, git divides the local space into two parts, part of the workspace (working directory), the Studygit directory is the workspace to store our own files, and the other is the repository (Repository), also known as a warehouse ,
complex requirements of the database)ALTER USER ' root ' @ ' localhost ' identified by ' Wangfeiyu123 ... ';
4) Initialize MySQL database mysql_secure_installationNote: After executing the initialization command, you need to enter the database root user password, and then the default as a return. (The above questions can also be selected according to their actual situation)
5) Create Gogs library (using UTF8 character set and InnoDB engine, mysql5.7
management space of Git.
WorkSpace: Directories and files that require version control through Git, which make up the workspace.
. Git: A directory that holds git management information and is created automatically when the repository is initialized.
Index/stage
create a repository with workspacesWhen you start a new project, you first create and initialize the code base. If it is in the working directory of this machine, then:$ git initIt's enough. If the repository you want to initialize is not in the current directory, you need t
is the name of the remote repository created in the front.Entering this folder, you can see that the contents of the remote repository have been successfully cloned locally.Vi. updating remote repositories to localUse the git fetch command to get the remote repository content.Use the
. e...| | o.++ +o. o| | . oo + +. + || .. o =. o| | S. || . || || || |+-----------------+In short, the local hold the private key, remote hold the corresponding public key, so that both sides can communicate securely. You can refer to this document for the mailbox parameters (it's a tag for SSH key, which is useful when the warehouse is on GitHub). The password is for the private key.VPS (Centos 6 x86 BBR):[[e
you've registered your GitHub account, the transfer between your local git repository and your github repository is encrypted via SSH, so you'll need a bit of setup:
1th step: Create SSH Key.
General new users in the Ubuntu/centos and other Linux systems have not set up ssh, that is: The owner of the directory does no
using the GIT protocol to access git is the most efficient. Although there are also some defects, it is mainly because there is no access permission control, however, you can still consider using the GIT protocol directly when you have high requirements on speed and efficiency in a trusted environment. note the following when using the
As the largest open source repository, GitHub is a programmer's paradise as a version control tool and an endless trove of treasures to discover. Now let's talk about how to download a project on GitHub locally, that is, build a project repository locally, and you'll be able to build the project later.(1) Create a new folder locally and use the folder as a local
team. The development tool used is VS2013, and the version tool uses TFS2015.1. Use vs to create a new GIT project code baseUsage: Initially build the development team or you need to add the existing project code to the repository for the first time to create the team's code base.Create a new project solution and choo
On a Linux server
The first step is to create an account that is specific to Git's warehouse, which is also easy to manage. You can refer to the Linux New User command for this article.
#新建一个git用户组sudo groupadd git#新建一个git用户, create a directory, and prevent shell logins fr
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.