next thing we need to do is to upload the local repository to GitHub, and we'll have to set up username and email before that, because GitHub will record them every time it commits.$ git config --global user.name "your name"$ git config --global user.email "[emailprotected]"Submit UploadCreate a new readme.md file locallyadd README.mdgit commit -m "first commit"git
Create a remote version Library
1. Set git
Git config -- global user. Name "myname"Git config -- global user. Email abcde@example.com
2. Create a version Library
A. Create a version library and push it to the remote end.
MkdirTestrepoCD testrepoGit initTouch readme. mdGit
Git is a powerful, open-source, distributed version control system that can be used for agile and efficient processing of any or small or large project.Here's a great tutorial on getting started with Git, which is a good tutorial for getting started with git.Add a remote repository GitHub started out a little more trouble, I was just getting into the pit for a lo
Environment:1. The local is empty, there is nothing2. There are 2 different projects (works), on the remote Git3. The need to merge the 2 projects locallyStart:1. From the remote clone first project code down and switch to the branch you want to merge.
git clone git@xxx.com/project_1.
1. Download githttp://git-scm.com/download/2. Install gitFollow the text prompts to3. Verify the success, enter the command lineGit--version4. Add your git account and emailgit config--global user.name "xiqian.lxq"--global user.emall "[Email protected]"5. Generate The secret key:SSH xiqian$ ssh-keygen-t rsa-c "Macbookpro"command required to enter a password, do n
git command line configuration1 Installing GitHub2 Installing Msysgit3 To configure the user name and fuel tankgit config--global user.name My command is: git config--global user.name Mchdbaghgit config--global user.email My command is: git config--global [email protected]4 Verifying that there is no remote server conn
illegal can not be submitted.This is where the introductory work comes in, and later features such as branching, collaborating with remote repositories, viewing records, and submitting records can all go straight to the git command and it's not difficult.Pumpkin Split-line *************************************************** *********Create a GitHub account and host local codeGo to the official website and
warehouseOpen git BashConfigure your identity first so that you can know who submitted it when you commit the codeEnter git config--global user.name "name"git config--global user.email "email address"CD into the current file directory, enter git init can be created ~Then use Ls-al Query code warehouse, if you want to
established, the local code can be submitted, only two commands are needed, add and commitAdd. is to submit allAdd + filename is a single file submissionGit commit-m "First commit" is submitted here to add the commit parameter after the-m parameter, it is important yo, otherwise it will be considered illegal can not be submitted.This is where the introductory work comes in, and later features such as branc
present, the MyProject1 Warehouse on the GitHub is still empty, GitHub tells us that we can clone a new warehouse from this warehouse, or we can associate an existing local warehouse with it, then push the contents of the local warehouse to the GitHub warehouse.
run the command in the local library to add an association:Git remote add Origin
There are two ways to associate a remote repository with a git local repository: 1. Clone the remote code to a local warehouse 2. Associating local code to a remote repository
1.git Clone Existing project (HTTPS | SSH) SSH: Check if your computer has a key to Id_rsa id_rsa.p
git commands git remote-View the name of the repository - v -View the address of the remote repository -origin -The name of the remote repository git push repository name (default is Origin) branch (master)-Sync to
two different ways:One is the check out remote code project to local (local originally no project)one is that the local project is submitted to the remote server (no project on the remote server) Method One : Please refer to the article:http://www.sxt.cn/info-6043-u-7372.html Blog mode Two applies to existing projectsstep: In Vcs--import into Version control--cre
This is a created
article in which the information may have evolved or changed. Uploading to GitHub with Linux (Debian) git, Problems and solutions "git init git add bubble.gogit add bubble_test.gogit commit-m" "Git
illegal can not be submitted.This is where the introductory work comes in, and later features such as branching, collaborating with remote repositories, viewing records, and submitting records can all go straight to the git command and it's not difficult.Pumpkin Split-line *************************************************** *********Create a GitHub account and host local codeGo to the official website and
In fork projects on GitHub, we often encounter updates to the main project. How can we merge the updates to our fork version? Today, someone suddenly asked me this question. I will write it here.The following uses Ruby-China For example, if I am a user @ tualatrix,And I have a ruby-China fork version in Here At this time, my local version is Tualatrix/ruby-China This
# Let me get the tualatrix fork version locally ~ /Work $ git clone
convenience! Confined to space,The author directly lost a link, we look at the picture to know: Cao She's official website: Create and Merge Branches! Write really good ~ Recommended collection!
After understanding the concepts, let's familiarize ourselves with several commands related to branching:① Create a branch (the latter creates a branch switch):git branch v1.0.3 或 git checkout -b v1.0.4② See a
Ssh-keygen " [email protected] " you need to change the email address to your own email address, and then return to the default value, as this key is not used for military purposes, so there is no need to set a password. If all goes well, you can find the. SSH directory in the user's home directory, there are Id_rsa and id_rsa.pub two files, these two are SSH key key pair, Id_rsa is the private key, can not be leaked out, Id_rsa.pub is the public key, can be assured to tell anyone. 2nd step: Log
The error when adding a remote GitHub repository using git today: Fatal:remote origin already exists.
Finally find the solution as follows:1. Delete remote git repository git remote rm originGit
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.