随笔 - 223  文章 - 0  评论 - 77  阅读 - 68万

git常用命令

1、下载远程代码

git clone <地址>

2、查看远程所有分支

git branch -a

3、创建并切换到本地develop分支

git checkout -b develop origin/develop

4、更新远程develop分支代码到本地

git pull origin develop

5、合并develop分支

git merge develop

6、提交暂存区到本地仓库中

  • 先add再commit

git add [file1] [file2] ...
git commit -m [message]
  • 提交暂存区的指定文件到仓库区:

git commit [file1] [file2] ... -m [message]
  • -a 参数设置修改文件后不需要执行 git add 命令,直接来提交

git commit -a

7、推送本地develop分支代码到远程develop分支

git push origin develop

8、删除本地develop分支

git branch -d develop

9、删除远程develop分支

git push origin --delete develop

 

posted on   Arthurian  阅读(9)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· DeepSeek “源神”启动!「GitHub 热点速览」
· 我与微信审核的“相爱相杀”看个人小程序副业
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· C# 集成 DeepSeek 模型实现 AI 私有化(本地部署与 API 调用教程)
· spring官宣接入deepseek,真的太香了~
< 2025年2月 >
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 1
2 3 4 5 6 7 8

点击右上角即可分享
微信分享提示