I'm new to git-flow
but have worked in other version control systems (notably perforce) and used branching strategies very similar to git-flow. I'm not very familiar with the git CLI, so I use SmartGit and of late SourceTree.
I've set up git-flow on a client machine (remote/origin is a bare repo on a server) and I now see that there are two branches on my client - develop
and master
. But SourceTree never asked me for a working directory for the develop
. From what I see it is dynamically switching branches (fetching from appropriate remote branch).
My question - Is this the right way of working with git? I mean what if I am working in a feature/*
branch and need to work in a hotfix/*
branch. My changes to the feature/*
branch would get lost if I did not stash them before the switch.
In a past life the way we handled branches was to have a different root/working
folders for each branch and work on them in isolation without affecting work in any other branch.
Can I do the same with git i.e. clone each branch at a different working folder. More importantly would this scheme work with git-flow as implemented in SourceTree/SmartGit?