github利用git基本命令创建文件并上传指定仓库中

试错式学习方法:....再见

1. 创建文件并且初始化git环境,并且提交

git init
git add .
git commit -m "add something" 

2. 会出现没有指明仓库的警告,需要指定url地址。此时,在github上创建一个仓库并且复制对应的url,然后回到命令行中

git remote add origin http://github.com/仓库名字

3. 第一次提交需要指定平台

git push origin master

4.又出现警告两者信息不匹配,本地和远程的文件需要合并后才能提交

git pull origin master --allow-undated-histories
git commit -m "something"
git push origin master




猜你喜欢

转载自blog.csdn.net/weixin_41892205/article/details/80840104