Uploading local files to GitHub

Source: Internet
Author: User

1. Use the git Bash command

2. Binding Users

$ git config--global user.name  "xiaoyucheng921" $ git Config--global user.email  "[email protected]" 

3. Generate SSH key
first check whether the key has been generated CD ~/.ssh , if the returned LS has 3 files, the key has been generated.
If there is no key, pass
$ ssh-keygen-t rsa-c " [email protected] < Span class= "hljs-string" > " build
Build process all the way 3 times enter the return C:\Users\.ssh
4为github账号配置ssh key
登录github官网 点击头像———>settings--->SSH and GPG keys--->SSH keys--->key 将id_rsa.pub文件中key粘贴到此,最后Add key生成密钥
第一次需要以上步骤,以后可直接跳过
5
uploading local items to GitHub
1.cd d:XXXX进入到项目文件夹XXXX
2.执行指令:git init 初始化成功后项目里多了一个隐藏文件夹.git
3.执行指令:git add .
将所有文件添加到仓库
4.执行指令:git commit -m "提交文件" 双引号内是提交注释。
6
Associated GitHub repositories
2. Execution instructions: git remote add origin https://github.com/ xiaoyucheng921/news.git 这个地址是github创建仓库时产生的
3.执行指令:git push -u origin master


Uploading local files to GitHub

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.