git链接github使用说明
github 使用指南 1.下载安装git 2.本地进入git bash 输入:ssh-keygen -t rsa -C "[email protected]" 进入C:\Users\xdkj.ssh 目录 打开id_rsa.pub 拷贝其中内容 3.进入github后台,SSH and GPG keys-->New SSH key ->title任意-->content:输入拷贝的内容 4.Ok
5.连接git bash中输入一下2句话 $ ssh -T [email protected](输入) The authenticity of host 'github.com (192.30.253.113)' can't be established. RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw*. Are you sure you want to continue connecting (yes/no)? yes(输入) Warning: Permanently added 'github.com,192.30.253.113' (RSA) to the list of known hosts. Hi arilpan! You've successfully authenticated, but GitHub does not provide shell access. 6.全局配置 git config --global user.name 'arilpan' git config --global user.email [email protected] 7.本地配置 cd /e cd /Open 设置本地E/Open为目录文件夹 mkdir OPENSource mkdir RoleManager cd RoleManager git init初始化 //以下 2句备用 git remote add origin [email protected]:arilpan/RoleManagement.git git push -u origin master //把本地 master 分支 推送到 服务器的master分支上,如果服务器没有此分支,就 新建 此分支。这也是 在服务器上新建分支的一种方法
8 git clone https://github.com/arilpan/RoleManagement.git 将项目从服务器拷贝下来 git push origin master =>成功 9 刷新github页面可以看到更新内容 </pre> 10.对于配置了ssh但是配置错误还是使用https的修复方式:
git remote remove origin git remote add origin [email protected]:Username/Your_Repo_Name.git设置track
git branch --set-upstream-to=origin/master master