svn - Why does git only have 1 workspace? -
compared subversion can start many workspaces. why can't git repository have more 1 workspace switching branches doesn't necessitate restitution of state before throwing away current branch. if i'm frustrated svn checkout, blow away , start new one. in git, want maintain local repo (and haven't pushed remotely) can't clone new repo.
with git, there couple of ways handle this:
git stash store working copy temporary area allow switch branches without having committed. git stash apply lay changes down. 2 work in push/pop stack-style mechanism. possible keep multiple stashes , apply arbitrary stash, wouldn't recommend it.
throwing out code little easier: git reset --hard head clear working state , revert last head in current branch you're working on. equivalent deleting working copy , checking out again.
Comments
Post a Comment