But if you've already pushed your commit to a remote repository, it is recommended that you do not use git reset since it rewrites the history of commits. Git Revertīoth the git revert and git reset commands undo previous commits. If this option is not used properly then one can end up losing the code that is written. If a file that is different between commit and HEAD has local changes, the reset is abortedīe very careful when using the -hard option with git reset since it resets your commit, staging area and your working directory. -keep: resets index entries and updates files in the working tree that are different between commitand HEAD.-merge: resets the index and updates the files in the working tree that are different between commitand HEAD, but keeps those which are different between the index and working tree. Any changes to tracked files in the working tree since commit are discarded
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |