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

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

2.创建ssh-key

ssh-keygen  -t rsa -C "[email protected]"
cd .ssh

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

3.验证ssh-key是否生效

ssh -T [email protected]

4.配置用户名及邮箱

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

5.创建work

mkdir test
cd test
git init
git  pull  [email protected]:yundd/test.git
git remote add origin [email protected]:yundd/test.git
echo "hello world">test.txt
git add   test.txt
git commit -m "写入提交内容的介绍"
git push [email protected]:yundd/test.git

猜你喜欢

转载自www.cnblogs.com/yundd/p/11616351.html