This question already has an answer here:
I'm currently trying to learn using Git within my workflow and I'd like to ask somethings how I could do them more easily.
I usually create different braches in order to do some thing and see if they work for me. When I'm switching branches how can I keep my working directory with the files and folders that has in the last commit? So for example when I switch from branch_A to master my working dir will have the folders and files of my last commit in master branch, or when I switch to branch_B my working dir will have all from last commit in branch_B, etc etc
git clean
), the other one included both needed steps (git reset
andgit clean
). Whomever closed them as duplicates originally might not have understood the distinction. – Andrew C Dec 2 '14 at 17:34