github创建自己的项目并进行推送

1.创建一个test项目安装gitbash

2.创建ssh-key

ssh-keygen  -t rsa -C "yundv@outlook.com"
cd .ssh

查看公钥并将公钥复制到github

3.验证ssh-key是否生效

ssh -T git@github.com

4.配置用户名及邮箱

git config -global user.name "用户名"
git config -global user.email "邮箱地址"

5.创建work

mkdir test
cd test
git init
git  pull  git@github.com:yundd/test.git
git remote add origin git@github.com:yundd/test.git
echo "hello world">test.txt
git add   test.txt
git commit -m "写入提交内容的介绍"
git push git@github.com:yundd/test.git
欢迎大家评论转发
原文地址:https://www.cnblogs.com/os4top16/p/11616351.html