Git reset hard/soft

				
					If you reset --hard, it will make your local code and local history be just like it was at that commit. But if you wanted to push this to someone else who has the new history, it would fail:

git reset --hard c14809fa
				
			
				
					And if you reset --soft, it will move your HEAD to where they were , but leave your local files etc. the same:

git reset --hard c14809fa

You can tag this as TAG1.. then a git reset --soft c14809fa, git reset --soft TAG1, or git reset --soft c14809fafb08b9e96ff2879999ba8c807d10fb07 would all do the same thing.
				
			

Leave a Comment