修改git最后一次提交的命令

$ git commit --amend

修改git最后一次提交用户名的相关命令

git config user.name 'wangz'
git config user.email 'wangz@alib.com'
git commit --amend --author=wangz

修改最后一次提交内容的相关文档

$ git commit --amend --help
usage: git commit [options] [--] <pathspec>... -q, --quiet suppress summary after successful commit
-v, --verbose show diff in commit message template Commit message options
-F, --file <file> read message from file
--author <author> override author for commit
--date <date> override date for commit
-m, --message <message>
commit message
-c, --reedit-message <commit>
reuse and edit message from specified commit
-C, --reuse-message <commit>
reuse message from specified commit
--fixup <commit> use autosquash formatted message to fixup specified commit
--squash <commit> use autosquash formatted message to squash specified commit
--reset-author the commit is authored by me now (used with -C/-c/--amend)
-s, --signoff add Signed-off-by:
-t, --template <file>
use specified template file
-e, --edit force edit of commit
--cleanup <default> how to strip spaces and #comments from message
--status include status in commit message template
-S, --gpg-sign[=<key id>]
GPG sign commit Commit contents options
-a, --all commit all changed files
-i, --include add specified files to index for commit
--interactive interactively add files
-p, --patch interactively add changes
-o, --only commit only specified files
-n, --no-verify bypass pre-commit hook
--dry-run show what would be committed
--short show status concisely
--branch show branch information
--porcelain machine-readable output
--long show status in long format (default)
-z, --null terminate entries with NUL
--amend amend previous commit
--no-post-rewrite bypass post-rewrite hook
-u, --untracked-files[=<mode>]
show untracked files, optional modes: all, normal, no. (Default: all)

git 修改最后一次提交的用户名 或者 commit的内容的更多相关文章

  1. git 修改最后一次提交

    git 修改最后一次提交 有时候我们提交完了才发现漏掉了几个文件没有添加,或者提交信息写错了. 此时,可以运行带有 --amend 选项的提交命令来重新提交:git commit --amend -m ...

  2. 【转】git修改文件后,提交到远程仓库

    原文地址:https://blog.csdn.net/nly19900820/article/details/73613654 修改文件后,怎么提交到远程仓库1.git status 查看git是否有 ...

  3. Git 修改用户名以及提交邮箱

    问题背景: 在已毕业师兄的电脑上提交自己的 Github 代码,(尽管有重新设置了 自己的SSH),但是 Github网站提交结果却显示师兄提交的: 验证当前本地属性: 怎么知道本地有设置?git c ...

  4. 修改git 提交的用户名和用户Email命令

    首页先查看全局配置:git config --list git config --local --list 法一:使用命令修改git的用户名和提交的邮箱 )修改全局 如果你要修改当前全局的用户名和邮箱 ...

  5. git修改用户名以及邮箱

    git 修改当前的project的用户名的命令为:git config user.name 你的目标用户名; git 修改当前的project提交邮箱的命令为:git config user.emai ...

  6. git修改提交的用户名

    场景分析 试想一下这样的场景,你先在自己的电脑上上创建了一个项目,并且把他添加到了git仓库,然后提交到了Github.但是,下一次,你在公司的电脑上clone了这个项目,并且修改了文件,当你提交到G ...

  7. 修改GIT已提交的用户名和邮箱

    修改GIT已提交的用户名和邮箱 原文:https://help.github.com/en/github/using-git/changing-author-info 说明 要更改在现有提交中记录的名 ...

  8. 修改git提交的用户名和密码

    目的:每个项目自定义Git提交的用户名和邮箱 1.在本地找到某个项目所在的地址 2.找到config文件 3.增加如下配置 4. ok,这样每个项目都可以定义提交者姓名和邮箱了

  9. GitHub超详细图文攻略 - Git客户端下载安装 GitHub提交修改源码工作流程 Git分支 标签 过滤 Git版本工作流

    最近听同事说他都在使用GitHub,GitHub是程序员的社区,在里面可以学到很多书上学不到的东西,所以最近在准备入手这方面的知识去尝试学习,正好碰到这么详细完整的文章,就转载了,希望对自己和大家有帮 ...

随机推荐

  1. mssql 字增自段怎样重置(重新自增)|清空表已有数据

    方法1 -- 清空已有数据,并且将自增自段恢复从1开始计数 truncate table 表名 方法2 -- 不清空已有数据,但将自增自段恢复从1开始计数 dbcc checkident(表名,RES ...

  2. SQL Tuning 基础概述08 - SQL Tuning Advisor

    SQL调优顾问 SQL Tuning Advisor的使用案例: 1.构建测试表T 2.定义调整任务 3.修改调整任务参数 4.执行调整任务 5.监控调整任务 6.查看调整任务建议 7.删除调整任务 ...

  3. Vue.js学习笔记(1)

    数据的双向绑定(ES6写法) 效果: 没有改变 input 框里面的值时

  4. 一步一步开发Game服务器(四)地图线程

    时隔这么久 才再一次的回归正题继续讲解游戏服务器开发. 开始讲解前有一个问题需要修正.之前讲的线程和定时器线程的时候是分开的. 但是真正地图线程与之前的线程模型是有区别的. 为什么会有区别呢?一个地图 ...

  5. Rafy 框架-发布网页版用户手册

    前段时间把 Rafy 的用户手册由 CHM 格式转换为了网页格式,而且发布到了 github.io 上,即方便文档的实时更新,也方便大家查看. Rafy 用户手册网页版地址: http://zgynh ...

  6. ASP.NET MVC实现权限控制

    这篇分享一下 ASP.NET MVC权限控制.也就是说某一用户登录之后,某一个用户是否有权限访问Controller,Action(操作),视图等 想实现这些功能,需要在数据库创建好几个表:[User ...

  7. Linq在Array,List,Dictionary中的应用

    Linq在Array,List,Dictionary中的应用 今天在实际工作中需要对array,list,dictionary进行排序,试一试linq,发现非常好用,代码如下: using Syste ...

  8. Mac入门 (二) 使用VMware Fusion虚拟机

    有了Mac机,还是需在Mac上用Windows怎么办?, VMware Fusion 是运行在Mac机上的虚拟机软件, 类似于VMware workstation. 这样就可以在Mac上运行Windo ...

  9. Spring在web应用中获得Bean的方法

    一:使用ApplicationContext获得Bean 首先新建一个类,该类必须实现ApplicationContextAware接口,改接口有一个方法,public void setApplica ...

  10. Regular Express正则表达式基础

    一. 创建一个正则表达式RegExp,有两种方式如下图所示 二. 创建一个正则表达式RegExp详述说明 1.构造函数 //RegExp 是js中一个内置的对象,是正则表达式的缩写 var reg = ...