1.先git clone 代码地址
git clone htttp://github.com/用户名/test.git
2. 添加文件
例如:touch 1.txt
3.将文件添加到暂存区
git add 1.txt
4.提交
git commit -m "commit 1.txt"
5.与远程仓库建立关联
git remote add 远程仓库名 远程仓库链接
例如:git remote add test htttp://github.com/用户名/test.git
6.git push 远程仓库名
例如:git push test
此时需要填写用户名和token

 
 
注意:当通过git init的方式构建本地仓库后,然后通过如上的方式push到远程仓库,会报错:

表示,需要先pull一下,保持远程与本地的同步。???


![[安洵杯 2019]easy_serialize_php](https://img-blog.csdnimg.cn/img_convert/7c693cd9f6e5ff270c5fa1ccf31c9df7.png)
















