gchk - create a new git branch for a given component


  gchk [options] <name>


gchk creates a new git branch with a given name and an updated index number. Branch names follow a standard naming format that specifies a name and an index number is appended to the name. When creating a new branch, the current branch must be "master".

The branch names follow this format:

The "name" portion is specified by the user and the "NNNNNN" index number is calculated by gchk.

gchk is given the name and it determines the index number to use. If this is the first branch to use this name, then the index number will be "000001". Otherwise, the last index will be incremented and that number will be used. The numbers are six digits long, with leading zeroes included. This makes it easier to sort the branch names.

The -last and -show options, described below, do not create new branches. They are used to assist in working with branches named in the aforementioned format.

The gmrg command may be used to easily merge branches named in this format with the "master" branch.

gchk and gmrg do not use meaningful branch names and they should not be used if meaningful branch names are required. These commands are useful in situations where there are many files being managed by git, frequent changes are being made to those files, and creating meaningful branch names is likely to become time-consuming and a hindrance.


gchk takes the following options:


Copyright 2014 Wayne Morrison

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


Wayne Morrison,


git(1), gmrg(1)