Git reset file to master => http://momleballro.nnmcloud.ru/d?s=YToyOntzOjc6InJlZmVyZXIiO3M6MjE6Imh0dHA6Ly9iaXRiaW4uaXQyX2RsLyI7czozOiJrZXkiO3M6MjQ6IkdpdCByZXNldCBmaWxlIHRvIG1hc3RlciI7fQ== All changes made since will reside in the working directory, which lets you re-commit the project history using cleaner, more atomic snapshots. Alternative: Revert the full commit Sometimes you may want to undo a whole commit with all changes. Git reset will never delete a commit, however, commits can become 'orphaned' which means there is no direct path from a ref to access them. In addition to updating the commit ref pointers, git reset will modify the state of the three trees. Invoking git status shows that Git is aware of the changes to the file. There are a number of compelling reasons as to why a developer needs a modern source code management tool like. Git reset will never delete a commit, however, commits can become 'orphaned' which means there is no direct path from a ref to access them. The changeset has been added to the Commit History. This is the default option. Resolve any conflicts if there are any, and your local branch should be fixed. You could do that with git reset --hard f414f31. Answer the questions posed by clicking the link for that section. For example you can still cherry-pick commits between the histories, e. This is the explicit --mixed behavior. Alternative: Revert the full commit Sometimes you may want to undo a whole commit with all changes. Finally, git checkout switches to the new feature branch, with all of your recent work intact. You should be able to pull down the new changes from remote repo. When you save and exit your editor, Git will apply your commits in order from top to bottom. How to force Git to overwrite local files on pull - Make sure you really want to remove all untracked files before doing this. My next steps were: git add. First, it's always worth noting that git reset --hard is a potentially dangerous command, since it throws away all your uncommitted changes. For safety, you should always check that the output of git status is clean that is, empty before using it. Initially you say the following: So I know that Git tracks changes I make to my application, and it holds on to them until I commit the changes, but here's where I'm hung up: That's incorrect. Git only records the state of the files when you stage them with git add or when you create a commit. So, suppose the good commit that you want to go back to is f414f31. You can find that via git log or any history browser. You could do that with git reset --hard f414f31. However, this is rewriting the history of your branch, so you should avoid it if you've shared this branch with anyone. Git reset file to master, the commits you did after f414f31 will no longer be in the history of your master branch. Make sure you really want to remove all untracked files before doing this. Try this and see git clean -f. Alternatively, as Paul Betts said, you should do git clean -xdf beware though - that removes all ignored files too.