On Wed, Jan 26, 2011 at 1:21 AM, Stefan Seifert <n...@detonation.org> wrote:
> Well you don't. Often you just can leave modified files in place while
> switching
> branches. If it's not working, you still can simply git stash before
> switching. git stash creates a temporary branch and commits your local
> changes
> to that branch. git stash apply lets you get back those changes, even if
> you're on a different branch than before (it's just like a git merge
> stash).
>
Hi Stefan,
I created a new branch and then in that branch created some new files and
committed them to that subbranch. I'm working on those new files. Any time
I make a change to one of those files and then want to quickly switch to the
master branch I get a lot of these...
$ git checkout master
error: You have local changes to 'Aircraft/foo/bar/newfile'; cannot switch
branches (because this file doesn't exist in master and the branch switch
requires deleting it.)
Ok, I could see git stash helping, but wow, if I start getting a few
branches going, that could potentially be a lot of extra typing and a lot of
things to remember (or go and check) every time I switch branches. When I
return to a branch do I have to remember to unstash some changes? If I
forget (life gets complicated sometimes) am I going to waste time chasing
issues I've already fixed?
If I have several branches in play, and someone pushes an important change
to fgdata/master (possibly tied to an important change in flightgear/next)
that can almost lead to an hour of just getting my branches up to date (even
with no direct conflicting files.)
I agree that some changes that have not been committed can float back and
forth through branch switching (just not the ones I'm making right now.) :-)
I found the book "Version control with git" quite useful. Yes it's somehow
> strange to need a book for a simple tool like a VCS, but git's features are
> IMHO worth having to read a little.
I've barely had a chance to crack open my applying RCS and SCCS O'Reilly
book, and now I have to buy a new book? ... :-)
I personally wouldn't call git a simple tool. Git takes a highly complex
problem (version control) and splits it up into just about the smallest
possible logical chunks. Then it leaves it up to the end user to remember
which chunks to stitch together and in which order to achieve the highly
complex task.
Many common tasks are easy in git. But some things start to become a royal
pain. Part of this is because I need to "adapt" my work flow to be more git
compatible. But I think part of this is that git has some limitations and
weaknesses too, and isn't completely perfect itself.
-- switching gears --
Another thing I do a lot of is work on projects that put me out in the field
or traveling. So I like to maintain my projects across multiple machines
... my office desktop pc, my laptop, possibly other machines too depending
on the project.
If I'm doing FlightGear based work, and I want to create a special branch
for my little project, *and* I want to share that branch across multiple
PC's and possibly do work at times from any of these PC's ... then I need to
create that branch on a server some place. Do I want to pollute the
official flightgear repository with a bunch of branches solely for the
purpose of my little side adventures? Do I create a separate clone on a
separate server and then try to keep those in sync? At some point I'm going
to have to sit down and think through the whole process of the best way to
share a "private" branch across multiple PC's ... and keep those all in sync
with each other and the official master repository.
It should be doable I think, but sounds to me like it will require typing a
lot of commands in the right order to make it work right ...
I'm sure there are many ways to make this all work cleanly, but the question
I have is if there's a way to do it that isn't too kludgey/hackish, isn't
too brittle and easily broken by upstream changes, and doesn't require an
unreasonable amount of command steps to accomplish.
Regards,
Curt.
--
Curtis Olson:
http://www.atiak.com - http://aem.umn.edu/~uav/
http://www.flightgear.org -
http://www.flightgear.org/blogs/category/curt/<http://www.flightgear.org/blogs/category/personal/curt/>
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel