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