|
[root@localhost hadoop]# git status -s
[root@localhost hadoop]# ll
total 28
-rw-r--r-- 1 root root 7 Dec 5 18:07 delete.me
-rw-r--r-- 1 root root 33 Dec 5 06:26 HelloWorld.java
-rw-r--r-- 1 root root 31 Dec 5 06:42 love.txt
-rw-r--r-- 1 root root 0 Dec 5 17:40 t1.txt
[root@localhost hadoop]# vi delete.me
[root@localhost hadoop]# cat delete.me
hello , world
[root@localhost hadoop]# git status -s
M delete.me
[root@localhost hadoop]# git add delete.me
[root@localhost hadoop]# git status -s
M delete.me
[root@localhost hadoop]# vi delete.me
[root@localhost hadoop]# git status -s
MM delete.me
[root@localhost hadoop]# git stash
Saved working directory and index state WIP on master: b714e98 commit
HEAD is now at b714e98 commit
[root@localhost hadoop]# git status -s
[root@localhost hadoop]# ll
total 28
-rw-r--r-- 1 root root 7 Dec 5 18:11 delete.me
-rw-r--r-- 1 root root 33 Dec 5 06:26 HelloWorld.java
-rw-r--r-- 1 root root 31 Dec 5 06:42 love.txt
-rw-r--r-- 1 root root 0 Dec 5 17:40 t1.txt
[root@localhost hadoop]# vi HelloWorld.java
[root@localhost hadoop]# git status -s
M HelloWorld.java
[root@localhost hadoop]# git add HelloWorld.java
[root@localhost hadoop]# git commit -m "bug fix"
[master 54cf628] bug fix
1 file changed, 1 insertion(+)
[root@localhost hadoop]# git status -s
[root@localhost hadoop]# git stash pop
On branch master
Changes not staged for commit:
(use "git add ..." to update what will be committed)
(use "git checkout -- ..." to discard changes in working directory)
modified: delete.me
no changes added to commit (use "git add" and/or "git commit -a")
Dropped refs/stash@{0} (963a3ab0075e09ee63117b6b8b606780aca5d020)
[root@localhost hadoop]# ll
total 28
-rw-r--r-- 1 root root 26 Dec 5 18:12 delete.me
-rw-r--r-- 1 root root 37 Dec 5 18:11 HelloWorld.java
-rw-r--r-- 1 root root 31 Dec 5 06:42 love.txt
-rw-r--r-- 1 root root 0 Dec 5 17:40 t1.txt
[root@localhost hadoop]# cat delete.me
hello , world
hello , git
[root@localhost hadoop]# git status -s
M delete.me
[root@localhost hadoop]#
|
|
|