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

**URL:** <https://forum.vassalengine.org/t/okay-flintb-lets-talk-git-command-line/10759>\
**Category:** Development\
**Created:** [June 22, 2020, 12:24am UTC](https://forum.vassalengine.org/t/okay-flintb-lets-talk-git-command-line/10759 "2020-06-22T00:24:12Z")\
**Posts on this page:** 7\
**Page:** 2

<div class="post-metadata">

**Author:** ![Flint1b](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/flint1b/32/246_2.png) [@Flint1b](https://forum.vassalengine.org/u/Flint1b)\
**Post date:** [June 24, 2020, 8:38pm UTC](https://forum.vassalengine.org/t/okay-flintb-lets-talk-git-command-line/10759/21 "2020-06-24T20:38:07Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![Cattlesquat](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/cattlesquat/32/241_2.png) [@Cattlesquat](https://forum.vassalengine.org/u/Cattlesquat)\
**Post date:** [June 24, 2020, 8:46pm UTC](https://forum.vassalengine.org/t/okay-flintb-lets-talk-git-command-line/10759/22 "2020-06-24T20:46:50Z")

</div>

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 🙂 Good times.

---

<div class="post-metadata">

**Author:** ![uckelman](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/uckelman/32/10020_2.png) [@uckelman](https://forum.vassalengine.org/u/uckelman)\
**Post date:** [June 24, 2020, 10:35pm UTC](https://forum.vassalengine.org/t/okay-flintb-lets-talk-git-command-line/10759/23 "2020-06-24T22:35:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Cattlesquat](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/cattlesquat/32/241_2.png) [@Cattlesquat](https://forum.vassalengine.org/u/Cattlesquat)\
**Post date:** [June 25, 2020, 12:15am UTC](https://forum.vassalengine.org/t/okay-flintb-lets-talk-git-command-line/10759/24 "2020-06-25T00:15:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![uckelman](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/uckelman/32/10020_2.png) [@uckelman](https://forum.vassalengine.org/u/uckelman)\
**Post date:** [June 25, 2020, 10:38am UTC](https://forum.vassalengine.org/t/okay-flintb-lets-talk-git-command-line/10759/25 "2020-06-25T10:38:34Z")

</div>

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. 🙂

–  
J.

---

<div class="post-metadata">

**Author:** ![uckelman](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/uckelman/32/10020_2.png) [@uckelman](https://forum.vassalengine.org/u/uckelman)\
**Post date:** [June 25, 2020, 10:53pm UTC](https://forum.vassalengine.org/t/okay-flintb-lets-talk-git-command-line/10759/26 "2020-06-25T22:53:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![uckelman](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/uckelman/32/10020_2.png) [@uckelman](https://forum.vassalengine.org/u/uckelman)\
**Post date:** [June 25, 2020, 10:55pm UTC](https://forum.vassalengine.org/t/okay-flintb-lets-talk-git-command-line/10759/27 "2020-06-25T22:55:09Z")

</div>

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.

[Previous page](https://forum.vassalengine.org/t/okay-flintb-lets-talk-git-command-line/10759.md?page=1)
