Thread (15 messages) flat view 15 messages, 7 authors, 2016-06-15

Re: question concerning branches

From: Jakub Narebski <hidden>
Date: 2016-06-15 22:47:17

On Wed, 19 Aug 2009, Ingo Brueckl wrote:
Jakub Narebski [off-list ref] writes:
quoted
You finish old work (or stash it away), _then_ you begin new work.
Ok, this helps me a little bit to understand.

The branches aren't designed to split my work, but rather something to
collect the different parts of my work.
Well, git is flexible enough that it can support also the workflow you 
tried to use.  

Namely you can have many working directories tied to single repository 
(each of those checkouts should be of different branch).  You can use 
git-new-workdir script from contrib/worktree for that.  Then to switch 
branches you would just cd to appropriate directory (and keep unsaved 
changes and untracked files).  That said it is [much] less used 
workflow.
 
But as software development often is something where you are coding on
several issues at the same time which can't be committed immediately,
it sounds that 'stash' is the developer's best friend.
Well, you can also commit and then clean up history with interactive 
rebase (or patch management interface such as StGit or Guilt).  In 
distributed version control systems like Git the act of publishing 
changes is separate from the act of committing them (you should not 
rewrite published history, though).

-- 
Jakub Narebski
Poland
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help