For the second time today git commit -m "don't quit me now"
deletes my entire repo. So it goes:
$ git add .
$ git commit -m "please, be gentle"
[master 7af0e9c] please, be gentle
140 files changed, 0 insertions(+), 3186 deletions(-)
delete mode 100644 .DS_Store
delete mode 100644 .gitignore
delete mode 100644 .rspec
delete mode 100644 Gemfile
...
I've been using Github for Mac alongside the command line and wondering if that's somehow effing things up.
$ git checkout
$ git status
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# deleted: .DS_Store
# deleted: .gitignore
# deleted: .rspec
# deleted: Gemfile
# deleted: Gemfile.lock
Since git status
tells you that everything is staged for deletion, before doing anything else, reset the index to HEAD
:
git reset HEAD
After doing this, git status
should echo
no changes added to commit (use "git add" and/or "git commit -a")
Then, try again:
git add .
git commit -m "new try"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With