Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ mkdir /tmp/test_git
- $ cd /tmp/test_git
- $ git init
- Initialized empty Git repository in /home/chris/tmp/thing/.git/
- $ echo '(kill-emacs)' > killer.el
- $ git add killer.el
- $ git ci -m "Killer"
- [master (root-commit) dce2981] Killer
- 1 file changed, 1 insertion(+)
- create mode 100644 killer.el
- $ mkdir -p nested/sub/directory
- $ touch nested/sub/directory/some_file.el
- $ git st
- # On branch master
- # Untracked files:
- # (use "git add <file>..." to include in what will be committed)
- #
- # nested/
- nothing added to commit but untracked files present (use "git add" to track)
- $ mkdir nested/dir/ -p
- $ touch nested/dir/script.el
- $ git st
- # On branch master
- # Untracked files:
- # (use "git add <file>..." to include in what will be committed)
- #
- # nested/
- nothing added to commit but untracked files present (use "git add" to track)
- ##
- ## SHELL GLOBBING DOES NOT ADD FILES IN DIRECTORIES
- ##
- $ git add *.el
- $ git st
- # On branch master
- # Untracked files:
- # (use "git add <file>..." to include in what will be committed)
- #
- # nested/
- nothing added to commit but untracked files present (use "git add" to track)
- ##
- ## NOW, WITH SINGLE QUOTES AFTER --
- ##
- $ git add -- '*.el'
- $ git st
- # On branch master
- # Changes to be committed:
- # (use "git reset HEAD <file>..." to unstage)
- #
- # new file: nested/dir/script.el
- # new file: nested/sub/directory/some_file.el
- #
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement