I mistakenly committed my codes in wrong branch, those changes still in my local repository, not pushed to remote repository. I wan to revert all my unpushed changes, but I want all my local changes to be retained in local.
May I know the git command to fix this case
ehowtonow
Delete the most recent commit without loosing your changes, use below command (–soft is optional – by default it will use –soft reset)
Delete the most recent commit changes you made in local will be lost, use below command
If you have made more than one commit, want to reset all the commits but want to retain your local changes, use below command
If you have made more than one commit, want to reset all the commits and don’t want to retain your local changes, use below command (This will sync your local repo with origin branch)
Ganesh
How to apply created patch to new branch ? we tried to merge two branch using patch
If some knows the ans please reply to my question