Skip to content

Instantly share code, notes, and snippets.

@aruprakshit
Last active November 4, 2015 07:02
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save aruprakshit/08058a0d1e9bed7ccb7a to your computer and use it in GitHub Desktop.
How to unstage a specific file from your last commit ?
[arup@critique (permitted_user_fix_review)]$ git commit -m "Live update of notification counter after create/remove any reviews"
# On branch permitted_user_fix_review
# Changes not staged for commit:
# (use "git add/rm <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: .env.example
# modified: app/assets/javascripts/sync/notification.coffee
# modified: app/controllers/notifications_controller.rb
# modified: app/controllers/reviews_controller.rb
# modified: app/models/review.rb
# modified: app/views/notifications/_notifications.html.haml
# modified: app/views/sync/notifications/_notification.html.haml
# deleted: app/views/sync/users/_notification_count.html.haml
# modified: config/routes.rb
#
no changes added to commit (use "git add" and/or "git commit -a")
[arup@critique (permitted_user_fix_review)]$ git commit -am "Live update of notification counter after create/remove any reviews"
[permitted_user_fix_review 4b54ef4] Live update of notification counter after create/remove any reviews
9 files changed, 33 insertions(+), 11 deletions(-)
delete mode 100644 app/views/sync/users/_notification_count.html.haml
[arup@critique (permitted_user_fix_review)]$ git status
# On branch permitted_user_fix_review
nothing to commit, working directory clean
[arup@critique (permitted_user_fix_review)]$
git reset HEAD~ .env.example; git commit --amend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment