Created
October 17, 2013 12:24
-
-
Save masak/7023973 to your computer and use it in GitHub Desktop.
Example of a current directory being removed when the last file in it is 'git rm'-ed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/tmp $ git init example | |
Initialized empty Git repository in /tmp/example/.git/ | |
/tmp $ cd example | |
/tmp/example $ mkdir foo | |
/tmp/example $ touch foo/bar | |
/tmp/example $ git add foo/bar | |
/tmp/example $ git commit -m 'add foo/bar' | |
[master (root-commit) 4fce4e5] add foo/bar | |
0 files changed | |
create mode 100644 foo/bar | |
/tmp/example $ cd foo | |
/tmp/example/foo $ git rm bar | |
rm 'foo/bar' | |
/tmp/example/foo $ git status | |
fatal: Unable to read current working directory: No such file or directory | |
/tmp/example/foo $ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment