Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2109636
  • 博文数量: 333
  • 博客积分: 10161
  • 博客等级: 上将
  • 技术积分: 5238
  • 用 户 组: 普通用户
  • 注册时间: 2008-02-19 08:59
文章分类

全部博文(333)

文章存档

2017年(10)

2014年(2)

2013年(57)

2012年(64)

2011年(76)

2010年(84)

2009年(3)

2008年(37)

分类: LINUX

2012-05-24 14:15:30

0. git commit --amend 可以修改最后一次 commit

1. // 查看修改

git rebase -i master~1 //最后一次
git rebase -i master~5 //最后五次


2. // 显示结果如下,修改 pick 为 edit ,并 :wq 保存退出

pick 92b495b 2009-08-08: ×××××××

# Rebase 9ef2b1f..92b495b onto 9ef2b1f
#
# Commands:
#  pick = use commit
#  edit = use commit, but stop for amending //改上面的 pick 为 edit
#  squash = use commit, but meld into previous commit
#
# If you remove a line here THAT COMMIT WILL BE LOST.
# However, if you remove everything, the rebase will be aborted.
#



3. 命令行显示:

Rebasing (1/1)
You can amend the commit now, with

git commit --amend



4. 使用 git commit --amend 进行修改,完成后 :wq 退出

5. 使用 git rebase --continue 完成操作
阅读(7741) | 评论(0) | 转发(0) |
0

上一篇:ubuntu搭建Git 服务器

下一篇:英语学习网站

给主人留下些什么吧!~~