I cloned a remote repository. I did not edit the repository, but git pull -rebase is telling me I need to commit changes first. I just want to overwrite and start with the current repository. I thought a pull would do that, but for some reason git thinks I edited the repo. Help!
3 Answers
git fetch origin # get all branches from remote repo git reset --hard origin/master # discard whatever you have and switch to master branch of remote repo 2 Comments
Ishmael Mavor Raines
Will the command change the files in the working directory? Need to reassure
Ishmael Mavor Raines
Fornutately i took a backup before i tried your commands :) Yess the comands fetch and reset wiped replaced everything