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]
- How do I check out a remote Git branch?
- What is git tag, How to create tags & How to checkout git remote tag(s)
- What does ‘–set-upstream’ do?
- What does ‘–set-upstream’ do?
- Difference between “git add -A” and “git add .”
- Git: Message ‘src refspec master does not match any’ when pushing commits in Git
- Git: Message ‘src refspec master does not match any’ when pushing commits in Git
- error: src refspec master does not match any
- What does cherry-picking a commit with Git mean?
- How to cherry pick from 1 branch to another
- How to Git stash pop specific stash in 1.8.3?
- How to use Git Revert
- What is the best (and safest) way to merge a Git branch into master?
- How to merge branch to master?
- How do I force git pull to overwrite everything on every pull?
- What happens when I do git pull origin master in the develop branch?
- Undo a Git merge that hasn’t been pushed yet
- How do I properly force a Git push?
- fatal: Not a git repository (or any of the parent directories): .git [duplicate]
- Why is “MINGW64” appearing on my Git bash?
- How to remove local (untracked) files from the current Git working tree
- Squash my last X commits together using Git
- Git merge hotfix branch into feature branch
- Git refusing to merge unrelated histories on rebase
- Git submodule update
- How to apply a patch generated with git format-patch?
- What does ‘git merge –abort is equivalent to git reset –merge when MERGE_HEAD is present.’ of Git merge man page mean?
- What does ‘git blame’ do?
- Abort a Git Merge
- What is the difference between git push origin and git push origin master
- GitHub: Permission denied (publickey). fatal: Could not read from remote repository
- Git fetch remote branch
- How to delete a remote tag?