So I'm interested in opinions about my current GIT workflow (which I'm new to), and how to determine which of my changes have not yet been merged/pushed to the appropriate repositories. So first off, my current system looks like this:
remote.master
|
|
V
local.master
| | |
V V V
branch branch branch
For a new task, I would pull from remote.master to local.master, create a new branch and check it out. I would do various commits while working on the task, maybe switching to other tasks, and then when ready, would pull from remote.master to local.master, merge my branch to local.master, and finally push to remote.master.
So 2 questions: for a small team, is this overkill? Does it make more sense to omit the local branches? If so, some advice suggests there will be either problems with 'fast forwarding' (which I understand makes changes indistinguishable in remote.master) or a plethora of commit that have potentially unexpected timestamps and are difficult to parse through.
2nd, assuming the above workflow: I sometimes switch between tasks frequently. I want a screen that shows me:
'branch 01' -> partially merged to local.master
'branch 04' -> notmerged to local.master
'local.master' -> partially merged to remote.master
It can happen that I forget if various features have been merged, and to where. I definitely don't want to go branch-by-branch and attempt to divine this info through 'git diff' or other commands. I currently use Tortoise GIT on Windows, but am open to other graphical alternatives. I do use the shell at times, but prefer a UI. Is there a way to get this info?
git branch
shows only the local ones. But I think you're thinking that branches are more than they actually are: they are really just "sticky notes" of a sort, pasted onto particular commits. When you commit something to a branch, this adds a new commit and moves the sticky note forward. The actual branches are always determined dynamically from the commit graph. It's left up to the user to keep branch label names sensible. – Antipodal