git-使用staf暂存分支

使用staf暂存分支
		index.less写了
	        @media screen and (max-width:1360px){
	        .nav-0518 > div {
	        width: 1200px;
	        margin: 0 auto;
	        }
	        }
	    保存暂存区,新建分支写文字:
	        PS D:\dnmp\www\www.abc.com> git stash
	        warning: LF will be replaced by CRLF in public/css/index.css.
	        The file will have its original line endings in your working directory.
	        Saved working directory and index state WIP on html: c48a074 goods/index.html 修改文字‘政策
	        PS D:\dnmp\www\www.abc.com> git stash list
	        stash@{0}: WIP on html: c48a074 goods/index.html 修改文字‘政策
	    新分支写了东西,提交了。切换回来发现东西不在了
	        PS D:\dnmp\www\www.abc.com> git checkout -b newhtml
	        Switched to a new branch 'newhtml'
	        M       public/css/index.css
	        M       public/css/index.less
	        PS D:\dnmp\www\www.abc.com> git add .
	        warning: LF will be replaced by CRLF in public/css/index.css.
	        The file will have its original line endings in your working directory.
	        PS D:\dnmp\www\www.abc.com> git commit -m "index.less,index.css 缩小版样式修改开始"
	        [newhtml 0f8909b] index.less,index.css 缩小版样式修改开始
	        1 file changed, 2 insertions(+), 1 deletion(-)
	        PS D:\dnmp\www\www.abc.com> git checkout master
	        Switched to branch 'master'
	        Your branch is up to date with 'origin/master'.
	        PS D:\dnmp\www\www.abc.com> git checkout html
	        Switched to branch 'html'
	    gitstashpop就回来了:
	        PS D:\dnmp\www\www.abc.com> git stash pop
	        On branch html
	        Changes not staged for commit:
	        (use "git add <file>..." to update what will be committed)
	        (use "git checkout -- <file>..." to discard changes in working directory)

	        modified:   public/css/index.css
	        modified:   public/css/index.less

	        no changes added to commit (use "git add" and/or "git commit -a")
	        Dropped refs/stash@{0} (f2e1dfdec076a7b0a9ae85c6e06b437ce5294aa4)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值