这是查询到的一些命令行语句:
查看远程仓库:$ git remote -v
添加远程仓库:$ git remote add [name] [url]
删除远程仓库:$ git remote rm [name]
修改远程仓库:$ git remote set-url --push [name] [newUrl]
拉取远程仓库:$ git pull [remoteName] [localBranchName]
推送远程仓库:$ git push [remoteName] [localBranchName]
1.修改命令
git remote origin set-url [url]
2.先删后加
git remote rm origin
git remote add origin [url]
提交暂存区到仓库区
$ git commit -m [message]
提交暂存区的指定文件到仓库区
$ git commit [file1] [file2] … -m [message]
提交工作区自上次commit之后的变化,直接到仓库区
$ git commit -a
提交时显示所有diff信息
$ git commit -v
使用一次新的commit,替代上一次提交
如果代码没有任何新变化,则用来改写上一次commit的提交信息
$ git commit --amend -m [message]
重做上一次commit,并包括指定文件的新变化
$ git commit --amend [file1] [file2] …
继续阅读与本文标签相同的文章
下一篇 :
C语言get函数汇总
-
Jvm-Sandbox源码分析--增强目标类
2026-05-18栏目: 教程
-
联华华商,你变了!
2026-05-18栏目: 教程
-
基于宜搭的“设备报修”实践案例
2026-05-18栏目: 教程
-
客服服务除了电话和工单还有哪些服务?阿里云服务方式整理
2026-05-18栏目: 教程
-
个人音视频常用工具介绍
2026-05-18栏目: 教程
