您的位置:首页 > 其它

git使用技巧

2015-12-27 23:33 316 查看
小步快跑,快速迭代

gitconfig配置

.gitconfig

[user]

name = fqc

email = 337940626@qq.com

[core]

editor = vim #ubuntu上默认的nano

[alias]

ci = commit -a -v

st = status -s

br = branch

throw = reset –hard HEAD

throwh = reset –hard HEAD^

[color]

ui = true

[push]

default = current

备注

切换分支

git branch [version]

git diff

已修改未提交

git throw 【reset –hard HEAD】

已修改并已经提交

git throwh

将多个开发中的小版本合并压缩为一个大版本

git rebase -i HEAD~~

~表示 当前版本的上一版本

进入vim后保留第一个pick

其他的版本 cw(删除) s

命令模式ZZ(shif+zz)保存

tig

请参见之前博文tig git的好搭档
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  git vim 迭代 tig 技巧