"J.V." <jvsrvcs@xxxxxxxxx> writes: > If I am in my source code tree down deep in a directory at the command > line, how do I pull from a repo and force overwrite all files locally > (and also get files that I deleted locally, just in the folder I am > in?) > > I do not want to do this for the entire repo, just the directory that > I am in and also on the branch I am in. I am not in the 'master' > branch, but another branch. > > so > > $git reset --hard HEAD > > Would probably do my entire local repo and from 'master' (even if I > am not on master)? No. It asks "Please reset the index and the working tree files to match what I have in the commit I checked out". If you are on the 'slave' branch, the index and the working tree files are updated to match the commit at the tip of the 'slave' branch. It is unclear what you are trying to do, but if you made random changes in files in your current directory (somewhere deep), all changes are crap and you regret making them, and you are wishing to go back to the state you started from, then the way to ask "I want everything in this directory checked out from my current branch" is to say: $ git checkout HEAD -- . -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html