Advertisement
Guest User

Untitled

a guest
Jun 5th, 2015
326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. $ mkdir /tmp/test_git
  2. $ cd /tmp/test_git
  3. $ git init
  4. Initialized empty Git repository in /home/chris/tmp/thing/.git/
  5.  
  6. $ echo '(kill-emacs)' > killer.el
  7.  
  8. $ git add killer.el
  9.  
  10. $ git ci -m "Killer"
  11. [master (root-commit) dce2981] Killer
  12. 1 file changed, 1 insertion(+)
  13. create mode 100644 killer.el
  14.  
  15. $ mkdir -p nested/sub/directory
  16.  
  17. $ touch nested/sub/directory/some_file.el
  18.  
  19. $ git st
  20.  
  21. # On branch master
  22. # Untracked files:
  23. # (use "git add <file>..." to include in what will be committed)
  24. #
  25. # nested/
  26. nothing added to commit but untracked files present (use "git add" to track)
  27.  
  28. $ mkdir nested/dir/ -p
  29.  
  30. $ touch nested/dir/script.el
  31.  
  32. $ git st
  33.  
  34. # On branch master
  35. # Untracked files:
  36. # (use "git add <file>..." to include in what will be committed)
  37. #
  38. # nested/
  39. nothing added to commit but untracked files present (use "git add" to track)
  40.  
  41. ##
  42. ## SHELL GLOBBING DOES NOT ADD FILES IN DIRECTORIES
  43. ##
  44.  
  45. $ git add *.el
  46. $ git st
  47. # On branch master
  48. # Untracked files:
  49. # (use "git add <file>..." to include in what will be committed)
  50. #
  51. # nested/
  52. nothing added to commit but untracked files present (use "git add" to track)
  53.  
  54. ##
  55. ## NOW, WITH SINGLE QUOTES AFTER --
  56. ##
  57.  
  58. $ git add -- '*.el'
  59. $ git st
  60.  
  61. # On branch master
  62. # Changes to be committed:
  63. # (use "git reset HEAD <file>..." to unstage)
  64. #
  65. # new file: nested/dir/script.el
  66. # new file: nested/sub/directory/some_file.el
  67. #
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement