git : give me the repo, nuke everything local, I don't care -


does git have pull/checkout 'nuclear option' repo? don't care conflicts, don't need of local stuff, want goods can work.

[edit] clarify issues:

$ git pull error: local changes following files overwritten merge:  <...files couldn't care less about...>  please, commit changes or stash them before can merge. error: following untracked working tree files overwritten merge:  <...more files couldn't care less about...> 

better understand various git commands find 1 need "right now" come situation many times , learn piecemeal while grumbling , blaming git.

edit: went ahead , tried options , should it. pauljz in comments.

git clean -df # remove untracked files , directories git reset head --hard # revert uncommitted changes 

the above should need.

other options:

git pull -f # replace local files if have unpushed commits. 

or

git reset head --hard # remove unchanged, uncommitted files git pull 

or

git clean -f # remove untracked files (uncommitted files) git pull 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -