git checkout to undo a change Humble Devassy Chirammal › Forums › Git (distributed revision control and source code management system) Tips /Tricks.. › git checkout to undo a change This topic has 0 replies, 1 voice, and was last updated 8 years, 2 months ago by Humble. Viewing 1 post (of 1 total) Author Posts March 11, 2018 at 8:12 am #4759 Reply HumbleKeymaster If the file is unstaged or commited, try: git checkout -- filename If its staged, but not committed, try: git reset HEAD filename git checkout -- filename If its committed, then try: git checkout origin/master filename Author Posts Viewing 1 post (of 1 total) Reply To: git checkout to undo a change Your information: Name (required): Mail (will not be published) (required): Website: Set as private reply Submit