git上传文件简单使用

在 Git Bash Here 后 git init

先找到要上传文件的工作空间所在地方

点开要传的文件夹 Git Bash Here

//git 上传
git remote add origin + github的包名

//获取包名
https://github.com/
官网上创建一个储存库 创建的时候
公共的
复选框要选中 包名 点右边的绿色Clone or download 复制包名

paste 复制到 Git Bash Here 这里面 回车

之后 Studio 类名会变红 是对的

//去Studio 右键 git add

之后 Studio 类名会变绿 是对的

//去Studio 右键 git commit Dircetory…
写个add 点 commit and push
加载完后之后点commit and push

//把push Tags All 打对勾 选中 在 push

报错后 下面解决方法 复制完 等运行完 在重新git Repository push

//git解决错误

git pull origin master –allow-unrelated-histories
git push -u origin master -f

猜你喜欢

转载自blog.csdn.net/qq_43143884/article/details/83385018