You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
undo the commit, and remove file and from the stage, file itself won't change.
git reset {file_name}
reset to some revision with 3 common options.
#Files won't change, differences will be staged for commit.
git reset --soft {some_revision}
#Files won't change, differences won't be staged.
git reset --mixed {some_revision}
#Files will be reverted to the state of the selected commit, and any local changes will be lost.
git reset --hard {some_revision}
checkout all local and remote branches within the current revision of the repository.
git branch -a
delete a local branch
git branch -d {local_branch}
delete a remote branch
git push origin :{remote_branch}
# To clean up the deleted branch in other machines, run below command in other machines
# whose local repository has the deleted remote branch.
git fetch --all --prune