git 提交代码,拉取代码
文章目录
提交代码
1.查看状态
git status
2.暂存更改
git add .
3.提交代码
git commit -m '[备注信息]'
4.将本地代码提交到远程仓库
git push
拉取代码
1.查看项目远程仓库的配置
git remote -v
2.添加远程仓库
git remote add upstream git项目地址
3.获取项目更新
git fetch upstream
4.项目分支合并
git merge upstream/master
5.切换分支
git checkout 分支名
6.将a分支的某次提交,同时提交到b
git cherry-pick 某次提交的id
7.退出
git cherry-pick --abort
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论