Using Git

Why Git?


Essential Git Commands/Processes

Here is a list of commands that are available git bash, the git command line. Most of them are available with menu items and buttons in the git gui.  (Another graphical interface that some find more intuitive for accessing github is GitHub Desktop)

What to include in the git repo

Working in git

Working directory

#ignore backup files

*.idx

*.bak

*~

Temp/

Staging area

This is not a specific area, but is an indication of which files and changes will be included in the commit. You can add files or changes to a commit easily in the git gui.

Commit Message

The standard for the format for a commit message is:

<first line>
<blank line>
<bulleted comments about the commit>

The commit message first line is special and acts as title to the commit. It should answer briefly the question "Why are you making the changes?"

The bulleted comments start with a space and an asterisk.  They can include find/replace strings or any code that you used to make the changes. It should answer the question "How did you make the changes"

If your change includes a specially written script, you should briefly document that script in the bulleted comments.

An Example Commit Message

Here's an example of a fairly complicated commit for a Quechua project.
Most of the \so fields were under senses, but they should go into an entry level FLEx field. Here is the commit message for the change that moved the \so fields to the entry level:


    Move \so to the entry level

    * Entry level is before the first \ge, \sn or \ps
    * Did it with:
      perl -pf ../opl.pl Quechua.db |\
      perl -pE 's/(\\(ge|sn|ps) .*?)(\\so [^#]*#)/$3$1/' |\
      perl -pf ../de_opl.pl >Quechua1.db

    * verify and mv Quechua1.db Quechua.db