首页 > 其他 > 详细

git记录

时间:2019-10-28 12:41:33      阅读:53      评论:0      收藏:0      [点我收藏+]

1.  git更改用户名密码后,无法弹出输入用户名密码的地方去输入, pull或者push提示:fatal: Authentication failed for 。。。。

     git config --system --unset credential.helper

     重新输入用户名密码ok

 

2.  git每次都需要输入用户名密码: 经过1的操作后:

       随便进入一个git项目

      git config --global credential.helper store

       (全局解决,其它项目也生效,简单粗暴)

 

3.  git stash    用于临时保存和回复修改,每次使用都会新加一个stash@{num},num是编号

             场景: 当前正在修改,没改完,而版本库有更新,直接去pull会提示clean。。。error

                         此时需要先stash, 即暂时保存在stage区域(暂存区),然后pull更新版本就不会报错, 然后可以再将stash恢复出来继续修改。。。。。。

 

            更多可以查看: git stash --help, 如:

                  git stash pop      弹出最新的stash

                  git stash list       列出所有的stash

                  git stash show    显示stash的内容具体是什么,使用方法如 git stash show stash@{0}

                  git stash apply    恢复被暂存的文件,但是git栈中的这个不删除,用法:git stash apply stash@{0}

                  git stash drop     删除一个stash, 用法:git stash drop stash@{0}

                  git stash clear    清空

                      

          

 

git记录

原文:https://www.cnblogs.com/leehm/p/11751263.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!