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

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -