If you are at the root of your working directory, you can do git checkout -- .
to check-out all files in the current HEAD and replace your local files.
You can also do git reset --hard
to reset your working directory and replace all changes (including the index).
Related Posts:
- How do I check out a remote Git branch?
- What is git tag, How to create tags & How to checkout git remote tag(s)
- How do I revert a Git repository to a previous commit?
- How can I switch to another branch in git?
- How to get just one file from another branch?
- How do I revert a Git repository to a previous commit?
- How do I revert all local changes in Git managed project to previous state?
- How do I revert all local changes in Git managed project to previous state?
- How can I reset or revert a file to a specific revision?
- What’s the difference between git switch and git checkout
- git checkout tag, git pull fails in branch
- Git: How to update/checkout a single file from remote origin master?
- git checkout master error: the following untracked working tree files would be overwritten by checkout
- Git checkout – switching back to HEAD
- What is the best (and safest) way to merge a Git branch into master?
- Squash my last X commits together using Git
- How to apply a patch generated with git format-patch?
- Abort a Git Merge
- GitHub: Permission denied (publickey). fatal: Could not read from remote repository
- How to delete a remote tag?
- Updates were rejected because the tip of your current branch is behind its remote counterpart
- Updates were rejected because the tip of your current branch is behind its remote counterpart
- git stash apply version
- Git fetch remote branch
- Updating a local repository with changes from a GitHub repository
- How do I remove a submodule?
- What does “Changes not staged for commit” mean
- git: fatal: Could not read from remote repository
- How do I update Homebrew?
- Git error when trying to push — pre-receive hook declined
- Gitignore not working
- Could not open a connection to your authentication agent
- git checkout a single file from another branch and put in different folder
- Update Git branches from master
- Stash only one file out of multiple files that have changed with Git?
- How to find my GitHub username so that I can be found via the URL?
- Create a branch in Git from another branch
- Create Git branch with current changes
- github website publish cannot publish unborn HEAD
- What is HEAD in Git?
- What are the differences between git remote prune, git prune, git fetch –prune, etc
- How to get the current branch name in Git?
- How can I git stash a specific file?
- How do I resolve git saying “Commit your changes or stash them before you can merge”?
- How do you stash an untracked file?
- Filename too long in Git for Windows
- How to name and retrieve a stash by name in git?
- Stash just a single file
- Git – Ignore node_modules folder everywhere
- How do I provide a username and password when running “git clone [email protected]”?
- How to undo ‘git reset’?
- “*** Please tell me who you are.” when using SSH key
- master branch and ‘origin/master’ have diverged, how to ‘undiverge’ branches’?
- fatal: Not a valid object name: ‘master’
- Git and nasty “error: cannot lock existing info/refs fatal”
- How do I delete a local repository in git?
- Throw away local commits in Git
- Hard reset of a single file
- How to remove remote origin from a Git repository
- .gitignore and “The following untracked working tree files would be overwritten by checkout”
- Is there a “theirs” version of “git merge -s ours”?
- How do I copy a version of a single file from one Git branch to another?
- Git: cannot checkout branch – error: pathspec ‘…’ did not match any file(s) known to git
- Heroku: How to change a Git remote on Heroku
- Invalid VCS root mapping – 3 errors on my project
- Updates were rejected because the remote contains work that you do not have locally
- Undoing a ‘git push’
- What’s the significance of the “No newline at end of file” log?
- What is the difference between pull and clone in git?
- How do I clone a single branch in Git?
- Git update submodules recursively
- Do a “git export” (like “svn export”)?
- how to reset develop branch to master
- “fatal: HttpRequestException encountered.” Error with GitHub/Bitbucket Repositories due to dropping TLS-1.0 support
- Git’s local repository and remote repository — confusing concepts
- Repository size limits for GitHub.com
- How do i git push specific branch?
- fatal: could not read Username for ‘https://github.com’: No such file or directory
- How can I see which Git branches are tracking which remote / upstream branch?
- Git clone verbose output?
- Could not create work tree dir ‘example.com’.: Permission denied
- TortoiseGit-git did not exit cleanly (exit code 1)
- How to `git pull` while ignoring local changes?
- Uninitialize git repository
- How to create a local branch from an existing remote branch?
- Git says “Automatic merge failed”, what does it mean?
- How do I clone a subdirectory only of a Git repository?
- What is the .git folder?
- Updating and committing only a file’s permissions using git version control
- Create empty branch on GitHub
- Git – fatal: Unable to create ‘/path/my_project/.git/index.lock’: File exists
- Git push requires username and password
- WordPress Git Workflow Help
- WordPress and Git – What folders should I track?
- Pull latest stable release via git [closed]
- Why do the Roots theme CSS files not load (404)?
- Painless way to track remote Git repo for WordPress updates
- Questions about Git and WordPress [duplicate]
- WordPress on git – need help with configuration
- What’s is the best stack for cPanel continuous deployment?