Okay Flintb, Let's Talk "Git Command Line"

Yes exactly, the “checkout -b branchname” always branches off the currently selected branch, so first switch to master, then make a new branch.

And I just realized that I’m teaching the father of Civ2 how to use git, I bow down before you sir, you are part of the reason why I discovered wargames so late, the computer strategy games were just too good :slight_smile:

Haha glad you liked it! I wrote all the game code, AI, and most of the interface code for that … back when you traded code by copying everything into some directory on the LAN. I think we had our first source control (Sourcesafe) for the next game, Alpha Centauri, and then it was Perforce for most of the rest of my active time doing coding. I actually found, when I recovered my account on here, that I’d actually checked in honest-to-goodness code for Dominations on April 2, 2013, when I was briefly using git, but I’d clearly forgotten everything :slight_smile: Good times.

Thus spake Cattlesquat:

Haha glad you liked it! I wrote all the game code, AI, and most of the
interface code for that …

If I had all the time back I spent playing Civ II… well, that would be
an awful lot of time. But I wouldn’t want it back—that was one of the
best games I’ve played.


J.

Oh man, you guys are bringing back the memories! Let’s just say that one of the ways to get put in charge of Civ2 is to have played an absolutely unholy amount of Civ1, and then it was just an extended matter of writing Civ “the way I wanted to play it”. Good times, indeed.

Thus spake Cattlesquat:

Let’s just say that one of the ways to get put in charge of Civ2 is to
have played an absolutely unholy amount of Civ1,

I did that, but somehow it did not result in my writing Civ2. :slight_smile:


J.

Thus spake Brent Easton:

I had a similar problem where a commit I didn’t want got sucked into a
PR. I just had to un-make the change and commit again. This adds an
extra commit to your PR, but the PR process works by diff between the
current master and the sum of your PR commits, so the unwanted commit
‘disappears’ from the PR.

There’s a way to deal with this which involves an interactive rebase
and a force push. (Basically what you do is go back and rewrite your
commit history, then push it back upstream.)


J.

Thus spake Cattlesquat:

Looks great – I just saved (to moderation of course) a few minor
changes. There was one of the early examples where the keyword “commit”
was actually missing from a couple of the git command lines. And I made
a few minor “englishy” tweaks.

One thought I have – at one point you offer this command line:
git commit -a -m ‘applied requested changes’

And I think the “-a” is the part that was slurping up my .classpath into
some of my early commits? I eventually learned to just do “git add”
where needed and commit with a regular “git commit -m” and no -a and
that seemed safer, since I that way I am always explicitly naming the
things I want staged for commit and nothing gets put in there
“automatically”.

Another useful thing is the ‘-p’ argument to ‘git add’, as it lets you
pick just what changes you want to add. (You need not take them all.)


J.