Git|从隐藏项中获取指定文件

来源:互联网 发布:搜狗关键词优化排名 编辑:程序博客网 时间:2024/06/11 21:37

使用Git,有时需要隐藏本地的文件变化,但是之后只想从指定的隐藏项中获取指定文件,命令如下:

git checkout stash@{0} -- <filename>

其中,filename需要指定路径,或者把指定文件保存为新文件,命令如下:

git show stash@{0}:<full filename>  >  <newfile>

参考
http://stackoverflow.com/questions/15264553/how-to-unstash-only-certain-files?answertab=active#tab-top

原创粉丝点击