github上更新自己的项目代码

因为全程是自己写的小项目,所以不需要这一步:

git pull origin master

更新自己的项目具体流程如下:
1.添加所有代码到缓冲区:

git add .

我是使用idea自动添加新写或者修改的类到git的缓冲区中,所以也没这一步。
2.提交代码:

git commmit -m "update"

3.将更新的代码上传到github:

git push origin master

git冲突解决方案:

git status
git add .
git commit "Add these two files."
git merge master

git remote add origin https://github.com/zhengjiani/flask_example.git
git push -u origin master
$git fetch origin    //获取远程更新
$git merge origin/master //把更新的内容合并到本地分支

欢迎大家到我的仓库下去star哦@-@
https://github.com/zhengjiani/Store/tree/master/src

猜你喜欢

转载自blog.csdn.net/nicezheng_1995/article/details/81608970