赞
踩
输入以下命令进行配置
$git config --global user.name "yourname"
$git config --global user.email "youremail@example.com"
$git config --global user.editor yourdeitor
$ cd ~/.ssh
$ ls -la
$ rm id_rsa
$ rm id_rsa.pub
$ rm known_hosts
$ ssh-keygen -t rsa -C "****@163.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/ycx/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/ycx/.ssh/id_rsa.
Your public key has been saved in /c/Users/ycx/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:vOdSmPCEWy5scBMIFRQHUEQXFDQ//B/iXxIW3Cr5fqM ycxadr@163.com
The key's randomart image is:
+---[RSA 2048]----+
| oOXBOo |
| .o.+ . . |
| o+ o . |

| . =.oo . o |
| + OSo= = |
| = =o.* o |
| . ...o + . |
| .o o oo |
| .. Eo . |
+----[SHA256]-----+

将id_rsa.pub中内容复制进去
+ 创建成功后,在自己本地目录打开 git bash下输入以下命令
创建git 仓库
git init
创建自己的忽略文件
touch .gitignore/
创建README.md
echo "ssd" >>README.md
添加所有文件到索引
git add -A
提交changes
git commit -m "first"
添加服务器 git@…..是你的ssh路径
git remote add origin git@github.com********
提交到服务器,“master”是你的branchname
git push -u origin master
android 工程忽略文件如下:
/build
/app/.externalNativeBuild
/.gradle
/gradle
/.idea
/*.iml
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。