git - How can I unstage my files again after making a local commit? -
git - How can I unstage my files again after making a local commit? -
i have done next command
git add together <foo.java> git commit -m "add foo java" how can delete local commit , create foo.java in unstaged state?
if type git reset --hard, found revert modify foo.java original one.
git reset --soft head^ should want. after this, you'll have first changes in index (visible git diff --cached), , newest changes not staged. git status this:
# on branch master # changes committed: # (use "git reset head <file>..." unstage) # # modified: foo.java # # changes not staged commit: # (use "git add together <file>..." update committed) # (use "git checkout -- <file>..." discard changes in working directory) # # modified: foo.java # you can git add together foo.java , commit both changes @ once.
git
Comments
Post a Comment