如何使用git把本地代码上传到远程仓库上

初始化

git init

查看当前仓库状态

git status

将项目的文件添加到仓库中

git add test.txt
git add -A
git add .

将add的文件commit到仓库

git commit -m "提交内容介绍"

将本地的仓库关联到远程仓库上

git remote add origin 远程仓库地址

代码合并拉取

git pull --rebase origin master

代码上传到远程仓库

git push -u origin master

若本号内容有做得不到位的地方(比如:涉及版权或其他问题),请及时联系我们进行整改即可,会在第一时间进行处理。

请点赞!因为你们的赞同/鼓励是我写作的最大动力!

欢迎关注达达的简书!

这是一个有质量,有态度的博客

博客

原文地址:https://www.cnblogs.com/dashucoding/p/11932278.html