Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.85 KB | None | 0 0
  1.  $ mkdir test
  2.  $ cd test
  3.  $ git init
  4. Initialized empty Git repository in /home/pgniewek/test/.git/
  5.  $
  6.  $ echo "1" > 1.txt
  7.  $ git add 1.txt
  8.  $ git commit -m "one"
  9. [master (root-commit) ab603a5] one
  10.  1 file changed, 1 insertion(+)
  11.  create mode 100644 1.txt
  12.  $
  13.  $ echo "2" > 2.txt
  14.  $ echo "3" > 3.txt
  15.  $
  16.  $ ls
  17. 1.txt  2.txt  3.txt
  18.  $
  19.  $ cat *
  20. 1
  21. 2
  22. 3
  23.  $
  24.  $ git add 2.txt
  25.  $ git status
  26. On branch master
  27. Changes to be committed:
  28.   (use "git reset HEAD <file>..." to unstage)
  29.  
  30.     new file:   2.txt
  31.  
  32. Untracked files:
  33.   (use "git add <file>..." to include in what will be committed)
  34.  
  35.     3.txt
  36.  
  37.  $ git reset
  38.  $ git status
  39. On branch master
  40. Untracked files:
  41.   (use "git add <file>..." to include in what will be committed)
  42.  
  43.     2.txt
  44.     3.txt
  45.  
  46. nothing added to commit but untracked files present (use "git add" to track)
  47.  $ cat *
  48. 1
  49. 2
  50. 3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement