git reset --hard origin/master
says: throw away all my staged and unstaged changes, forget everything on my current local branch and make it exactly the same as origin/master
.
You probably wanted to ask this before you ran the command. The destructive nature is hinted at by using the same words as in “hard reset”.
Related Posts:
- How can I undo git reset –hard HEAD~1?
- How do I discard unstaged changes in Git?
- Git: How do I force “git pull” to overwrite local files?
- How can I make git accept a self signed certificate?
- How can I revert multiple Git commits (already pushed) to a published repository?
- What is the difference between ‘git pull’ and ‘git fetch’?
- Git: cannot do a partial commit during a merge (SourceTree)
- Git: How do I force “git pull” to overwrite local files?
- Why does ‘git commit’ not save my changes?
- git push to specific branch
- Get changes from master into branch in Git
- Rebasing remote branches in Git
- What is the Git equivalent for revision number?
- difference between git merge origin/master and git pull
- How do I delete a Git branch locally and remotely?
- How do I use ‘git reset –hard HEAD’ to revert to a previous commit? [duplicate]
- How do I delete a Git branch locally and remotely?
- How do I rename a local Git branch?
- How do I undo the most recent local commits in Git?
- How do I revert a Git repository to a previous commit?
- Git: How do I force “git pull” to overwrite local files?
- Differences between git pull origin master & git pull origin/master
- How do I rename a local Git branch?
- How can I switch to another branch in git?
- What is the `git restore` command and what is the difference between `git restore` and `git reset`?
- How do I discard unstaged changes in Git?
- How to uncommit my last commit in Git [duplicate]
- Delete commits from a branch in Git
- How to uncommit my last commit in Git [duplicate]
- Why are there two ways to unstage a file in Git?
- Download single files from GitHub
- How do I revert a Git repository to a previous commit?
- Git: How to squash all commits on branch
- Undo git pull, how to bring repos to old state
- What does “Git push non-fast-forward updates were rejected” mean?
- Undo git pull, how to bring repos to old state
- What is difference between ‘git reset –hard HEAD~1’ and ‘git reset –soft HEAD~1’?
- How can I reset or revert a file to a specific revision?
- Else clause on Python while statement
- How to undo git reset –soft to get my changes back?
- Delete all local git branches
- Can I delete a git commit but keep the changes?
- Set up git to pull and push all branches
- Invalid VCS root mapping – 3 errors on my project
- Updates were rejected because the remote contains work that you do not have locally
- Move existing, uncommitted work to a new branch in Git
- how to reset develop branch to master
- Do I commit the package-lock.json file created by npm 5?
- git undo all uncommitted or unsaved changes
- How can I see the changes in a Git commit?
- How can I delete all Git branches which have been merged?
- What’s a good (free) visual merge tool for Git? (on windows)
- Getting Started with Subversion, Git, or similar Version Control System to keep a History of my Files? [closed]
- Should I use SVN or Git?
- WordPress Health Tool reporting version control as a critical issue
- storing database in version control
- Is it better to create a Git repository at the root level or in the WordPress theme directory?
- Pull latest stable release via git [closed]
- How should I be handling my theme version numbering?
- Version control with a team of non-developers
- Painless way to track remote Git repo for WordPress updates
- Questions about Git and WordPress [duplicate]
- How to rename the wp-config.php file once under version control?
- How to use one git (github) repository for version control for multiple themes
- version control for wordpress? (wordpress folder and database at same time)
- Revision History for Entire WordPress Site
- WordPress and Git: How does Git interact with your IDE? [closed]
- Git refusing to merge unrelated histories on rebase
- What is the difference between git push origin and git push origin master
- git error: failed to push some refs to remote
- git – remote add origin vs remote set-url origin
- Git: Message ‘src refspec master does not match any’ when pushing commits in Git
- How to upgrade Git on Windows to the latest version
- How can I save username and password in Git?
- What’s the purpose of git-mv?
- How do I revert all local changes in Git managed project to previous state?
- How to revert multiple git commits?
- The following untracked working tree files would be overwritten by merge, but I don’t care
- You have not concluded your merge (MERGE_HEAD exists)
- Remove a git commit which has not been pushed
- There is no tracking information for the current branch
- How to remove files from git staging area?
- Git push won’t do anything (everything up-to-date)
- git – Your branch is ahead of ‘origin/master’ by 1 commit
- How to remove a directory from git repository?
- How can I remove a commit on GitHub?
- What is the difference between ‘git remote update’, ‘git fetch’ and ‘git pull’?
- GitLab remote: HTTP Basic: Access denied and fatal Authentication
- What to gitignore from the .idea folder?git intellij-idea gitignore webstorm
- docker error : the input device is not a TTY. If you are using mintty, try prefixing the command with ‘winpty’
- How to have ‘git log’ show filenames like ‘svn log -v’
- Python way to clone a git repository
- Change the location of the ~ directory in a Windows install of Git Bash
- WordPress updates and Git
- How can I edit commit messages in my wp-hosted plugin repo?
- How developed with version control word press site on shared host? [closed]
- Is it bad practice to install WordPress by cloning from the official GitHub repo?
- Is it possible/advisable to set last stable version to previous version?
- Tortoise SVN showing ‘Access to ‘/!svn/me” forbidden error.
- how can I create a WP offline environment before releasing the websites? [closed]