随笔分类 -  git

摘要:在mac中,如果使用 git commit –amend,会出现如下错误:error: There was a problem with the editor ‘vi’. Please supply the message using either -m or -F option.原... 阅读全文
posted @ 2017-03-30 20:36 chenqiangzhishen 阅读(1537) 评论(0) 推荐(0) 编辑
摘要:git 默认使用emacs作为编辑器,我们可以如下任何一种方式来使用VIM在git config中设置core.editor: git config --global core.editor "vim"在环境变量中设置GIT_EDITOR: export GIT_EDITOR=vim... 阅读全文
posted @ 2016-02-24 11:24 chenqiangzhishen 阅读(834) 评论(0) 推荐(0) 编辑
摘要:下载git-completion.bash 并放到home 目录下: curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-comp... 阅读全文
posted @ 2016-01-26 10:14 chenqiangzhishen 阅读(364) 评论(0) 推荐(0) 编辑
摘要:参见github流程图,我们公司内部则采用gitlab,原理也一样。如果git 只需要修改最近一次提交的commit信息或代码,则可以通过如下方式解决: git add xxx git commit --amend -s git push [remote-repo-branch] ... 阅读全文
posted @ 2016-01-07 22:48 chenqiangzhishen 阅读(763) 评论(0) 推荐(0) 编辑
摘要:需要以common repo (gitlab)中的某个branch( remote_xxx)为基础,建立要添加的branch (new_xxx), 假设远程自己的repo为(origin)如果远程repo name为 gitlab.则:git checkout gitlab/remo... 阅读全文
posted @ 2016-01-07 18:22 chenqiangzhishen 阅读(452) 评论(0) 推荐(0) 编辑
摘要:英文: http://chris.beams.io/posts/git-commit/中文: http://blog.jobbole.com/92713/ 阅读全文
posted @ 2015-12-01 13:26 chenqiangzhishen 阅读(111) 评论(0) 推荐(0) 编辑
摘要:I believe this occurs when you are trying to checkout a remote branch that your local git repo is not aware of yet. Try:git remote show origin... 阅读全文
posted @ 2015-10-22 18:42 chenqiangzhishen 阅读(172) 评论(0) 推荐(0) 编辑

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