Github创建远程仓库

2020-05-03  本文已影响0人  海晏河清_富贵荣华
echo "# axiosPackage" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/Amanda-wang-belle/axiosPackage.git
git push -u origin master
                
git branch
image.png
git branch -r
image.png
git branch -a
image.png
git branch dev
git checkout dev
或者
git checkout -b dev
image.png
git push -u origin dev
git add .
git commit -m "项目框架"
git checkout master
git merge dev 合并dev
git push origin master 推送到master
1、如果是在master中进行的修改,然后推送远程仓库,则
git commit -am "master修改"
git push -u origin master
2、如果是在dev分支中进行的修改,然后推送远程仓库则
①、推送至dev
git commit -u "推送至dev"
git push -u origin dev
②推送至master
git commit -u "推送至master"
git checkout master
git merge dev
git push -u origin master
git pull 

13、切换到本地dev分支,将远程master分支上最新代码拉到本地dev分支

git pull origin master

[参考]https://www.jianshu.com/p/2f7e785bf117

上一篇下一篇

猜你喜欢

热点阅读