Re: [Flightgear-devel] git for dummies

2011-01-07 Thread stefan riemens
Hi Curt, 2011/1/7 Curtis Olson : > Hi Stefan, > Thanks for the reply.  You are exactly right to notice that I am struggling > a bit to understand the proper git workflow when dealing with branches.  I > have a couple more questions inserted below ... > > On Fri, Jan 7, 2011 at 1:39 PM, stefan riem

Re: [Flightgear-devel] git for dummies

2011-01-07 Thread Curtis Olson
Hi Stefan, Thanks for the reply. You are exactly right to notice that I am struggling a bit to understand the proper git workflow when dealing with branches. I have a couple more questions inserted below ... On Fri, Jan 7, 2011 at 1:39 PM, stefan riemens wrote: > Hi Curt, > > git merge is your

Re: [Flightgear-devel] git for dummies

2011-01-07 Thread Martin Spott
Curtis Olson wrote: > - What is the best way to clean up my "next" branch of all the changes I had > previously made before I created my own branch? I'd like to return it to > it's pristine untouched state now that I have a local branch for my local > changes. If anything else fails, if "next" i

Re: [Flightgear-devel] git for dummies

2011-01-07 Thread stefan riemens
Hi Curt, git merge is your friend! Perhaps a complete example workflow will help you get along: suppose you are on branch "next" tracking the gitorious branch "next". git branch wip -- wip is now an exact copy of the next branch git checkout wip Edit files to add some really cool feature git

Re: [Flightgear-devel] git for dummies

2011-01-07 Thread Curtis Olson
Hi Thorsten, Thanks for explaining this in detail. So here is my next question related to dealing with local branches. Let's say I make a local branch, make some changes, and I'm finally happy with those changes, so I commit them. (Or maybe I've committed several revisions of my changes over th

Re: [Flightgear-devel] git for dummies

2011-01-07 Thread ThorstenB
On Fri, Jan 7, 2011 at 7:48 PM, Curtis Olson wrote: > So what happens if I'm messing around with my "WildCrazyIdea-I-WantToTry" > branch over lunch, and suddenly I get a phone call and have to jump back to > doing something serious with FlightGear and need to quickly switch back to > my "RealWork"

Re: [Flightgear-devel] git for dummies

2011-01-07 Thread Curtis Olson
> On Fri, Jan 7, 2011 at 6:58 PM, Curtis Olson wrote: > > > I make a small test edit to a file (src/GUI/MapWidget.cxx). > > I run "git checkout next" to return to the pristine unchanged branch that > > tracks the head on gitorious --- but here is the output: > > $ git checkout next > > M src/GUI/Ma

Re: [Flightgear-devel] git for dummies

2011-01-07 Thread ThorstenB
On Fri, Jan 7, 2011 at 6:58 PM, Curtis Olson wrote: > I make a small test edit to a file (src/GUI/MapWidget.cxx). > I run "git checkout next" to return to the pristine unchanged branch that > tracks the head on gitorious --- but here is the output: > $ git checkout next > M src/GUI/MapWidget.cxx >

Re: [Flightgear-devel] git for dummies

2011-01-07 Thread Curtis Olson
Another git question ... I created a "mychanges" branch with "git branch mychanges". I run git branch and I see a * beside "mychanges" in the list of branches. I make a small test edit to a file (src/GUI/MapWidget.cxx). I run "git checkout next" to return to the pristine unchanged branch that t

Re: [Flightgear-devel] git for dummies

2011-01-07 Thread Curtis Olson
On Tue, Jan 4, 2011 at 2:44 PM, Curtis Olson wrote: > Ok, thanks for all the advice. "git diff --cached" did show me my actual > change that "git diff" had lost. I doubt I'll remember that next time I > need it. So I'll look at making changes to a branch in the future. At the > moment I'm just

Re: [Flightgear-devel] git for dummies

2011-01-04 Thread Curtis Olson
Ok, thanks for all the advice. "git diff --cached" did show me my actual change that "git diff" had lost. I doubt I'll remember that next time I need it. So I'll look at making changes to a branch in the future. At the moment I'm just trying to unwind my current tree. Apologies if I screw some

Re: [Flightgear-devel] git for dummies

2011-01-04 Thread Tim Moore
On Tue, Jan 4, 2011 at 5:36 PM, Curtis Olson wrote: > I have a git question. > > I'm trying to "git push" a new joystick config someone sent me. When I run > git push I get the following message: > > $ git push > To g...@gitorious.org:fg/fgdata.git > ! [rejected]master -> master (non-fa

Re: [Flightgear-devel] git for dummies

2011-01-04 Thread Dave L
On Tue, Jan 4, 2011 at 5:20 PM, Curtis Olson wrote: > That's probably not a bad tip, but I'm in a situation now where I have > local mods that "git diff" does not report and I'm not sure how to deal with > that. How can I find the differences between my local repository and the > master ... espec

Re: [Flightgear-devel] git for dummies

2011-01-04 Thread John Denker
On 01/04/2011 10:20 AM, Curtis Olson wrote: > I'm in a situation now where I have local > mods that "git diff" does not report and I'm not sure how to deal with that. > How can I find the differences between my local repository and the master > ... especially those changes that I haven't commit

Re: [Flightgear-devel] git for dummies

2011-01-04 Thread Curtis Olson
That's probably not a bad tip, but I'm in a situation now where I have local mods that "git diff" does not report and I'm not sure how to deal with that. How can I find the differences between my local repository and the master ... especially those changes that I haven't committed or pushed yet?

Re: [Flightgear-devel] git for dummies

2011-01-04 Thread stefan riemens
What I always do is keep the master (next in FG's case) completely in sync with upstream's master branch. For local modifications I always use another branch. That way, pulling and pushing always works as you'd expect. Merging is easy and cheap with git, i love that! PS, I'm not really a git exper