cd(1posix) $(mktemp -d); git init(1) a; ( cd(1posix) a; plan9-touch.1 a; git add(1) a; git commit(1) -m a); git clone(1) a b; ( cd(1posix) b; git checkout(1) -b ignore-this); git clone(1) a c; ( cd(1posix) c; git checkout(1) -b ignore-this); ( cd(1posix) a; echo(1) a >> a; git add(1) a; git commit(1) -m A; git checkout(1) -b ignore-this; git fetch(1) ../b; git push(1) ../b main); for a in *; do ( cd(1posix) $a; echo(1) $a; git log(1) main --oneline); done; ( cd(1posix) c; git fetch(1) ../b; git push(1) ../b main; echo(1) 'well that did not work -- try forcing it!'; git push(1) ../b main --force); for a in *; do ( cd(1posix) $a; echo(1) $a; git log(1) main --oneline); done
change the working directory
directory
       An absolute or relative pathname of the directory that shall become the new working directory. The
       interpretation of a relative pathname by cd depends on the  -L  option  and  the  CDPATH  and  PWD
       environment variables. If directory is an empty string, the results are unspecified.

-      When a hyphen is used as the operand, this shall be equivalent to the command:

       cd "$OLDPWD" && pwd

which changes to the previous working directory and then writes its name.
Commands separated  by  a ; are executed sequentially; the shell waits for each command to terminate in turn.  The
return status is the exit status of the last command executed.
Create an empty git repository or reinitialize an existing one
(list) list is executed in a subshell environment (see COMMAND EXECUTION  ENVIRONMENT  below).   Variable
       assignments and builtin commands that affect the shell's environment do not remain in effect after
       the command completes.  The return status is the exit status of list.
set modification date of a file
Add file contents to the index
Record changes to the repository
-m <msg>, --message=<msg>
    Use the given <msg> as the commit message.
Clone a repository into a new directory
git clone [--template=<template_directory>]
          [-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror]
          [-o <name>] [-b <name>] [-u <upload-pack>] [--reference <repository>]
          [--separate-git-dir <git dir>]
          [--depth <depth>] [--recursive|--recurse-submodules] [--] <repository>
          [<directory>]

<repository>
    The (possibly remote) repository to clone from. See the URLS section below for more information on
    specifying repositories.

<directory>
    The name of a new directory to clone into. The "humanish" part of the source repository is used if no
    directory is explicitly given (repo for /path/to/repo.git and foo for host.xz:foo/.git). Cloning into
    an existing directory is only allowed if the directory is empty.
Checkout a branch or paths to the working tree
-b
    Create a new branch named <new_branch> and start it at <start_point>; see git-branch(1) for details.
Updates files in the working tree to match the version in the index or the specified tree. If no paths
are given, git checkout will also update HEAD to set the specified branch as the current branch.

<branch>
    Branch to checkout; if it refers to a branch (i.e., a name that, when prepended with "refs/heads/",
    is a valid ref), then that branch is checked out. Otherwise, if it refers to a valid commit, your
    HEAD becomes "detached" and you are no longer on any branch (see below for details).

    As a special case, the "@{-N}" syntax for the N-th last branch checks out the branch (instead of
    detaching). You may also specify - which is synonymous with "@{-1}".

    As a further special case, you may use "A...B" as a shortcut for the merge base of A and B if there
    is exactly one merge base. You can leave out at most one of A and B, in which case it defaults to
    HEAD.

<new_branch>
    Name for the new branch.

<start_point>
    The name of a commit at which to start the new branch; see git-branch(1) for details. Defaults to
    HEAD.

<tree-ish>
    Tree to checkout from (when paths are given). If not specified, the index will be used.
display a line of text
Echo the STRING(s) to standard output.
Before a command is executed, its input and output may be redirected using a special notation interpreted
by  the  shell.   Redirection  may  also  be used to open and close files for the current shell execution
environment.  The following redirection operators may precede or appear anywhere within a simple  command
or may follow a command.  Redirections are processed in the order they appear, from left to right.

Appending Redirected Output
    Redirection of output in this fashion causes the file whose name results from the expansion of word to be
    opened  for  appending  on  file  descriptor  n,  or  the standard output (file descriptor 1) if n is not
    specified.  If the file does not exist it is created.

    The general format for appending output is:

           [n]>>word
Download objects and refs from another repository
Update remote refs along with associated objects
<repository>
    The "remote" repository that is destination of a push operation. This parameter can be either a URL
    (see the section GIT URLS below) or the name of a remote (see the section REMOTES below).

<refspec>...
    The format of a <refspec> parameter is an optional plus +, followed by the source ref <src>, followed
    by a colon :, followed by the destination ref <dst>. It is used to specify with what <src> object the
    <dst> ref in the remote repository is to be updated.

    The <src> is often the name of the branch you would want to push, but it can be any arbitrary "SHA-1
    expression", such as master~4 or HEAD (see gitrevisions(7)).

    The <dst> tells which ref on the remote side is updated with this push. Arbitrary expressions cannot
    be used here, an actual ref must be named. If :<dst> is omitted, the same ref as <src> will be
    updated.

    The object referenced by <src> is used to update the <dst> reference on the remote side, but by
    default this is only allowed if the update can fast-forward <dst>. By having the optional leading +,
    you can tell git to update the <dst> ref even when the update is not a fast-forward. This does not
    attempt to merge <src> into <dst>. See EXAMPLES below for details.

    tag <tag> means the same as refs/tags/<tag>:refs/tags/<tag>.

    Pushing an empty <src> allows you to delete the <dst> ref from the remote repository.

    The special refspec : (or +: to allow non-fast-forward updates) directs git to push "matching"
    branches: for every branch that exists on the local side, the remote side is updated if a branch of
    the same name already exists on the remote side. This is the default operation mode if no explicit
    refspec is found (that is neither on the command line nor in any Push line of the corresponding
    remotes file---see below).
for name [ [ in [ word ... ] ] ; ] do list ; done
       The  list of words following in is expanded, generating a list of items.  The variable name is set
       to each element of this list in turn, and list is executed each time.  If the in word is  omitted,
       the  for  command  executes  list  once  for each positional parameter that is set (see PARAMETERS
       below).  The return status is the exit status of the last command that executes.  If the expansion
       of  the  items  following  in  results  in an empty list, no commands are executed, and the return
       status is 0.
Show commit logs
<since>..<until>
    Show only commits between the named two commits. When either <since> or <until> is omitted, it
    defaults to HEAD, i.e. the tip of the current branch. For a more complete list of ways to spell
    <since> and <until>, see gitrevisions(7).

[--] <path>...
    Show only commits that are enough to explain how the files that match the specified paths came to be.
    See "History Simplification" below for details and other simplification modes.

    To prevent confusion with options and branch names, paths may need to be prefixed with "-- " to
    separate them from options or refnames.
--oneline
    This is a shorthand for "--pretty=oneline --abbrev-commit" used together.
-f, --force
    Usually, the command refuses to update a remote ref that is not an ancestor of the local ref used to
    overwrite it. This flag disables the check. This can cause the remote repository to lose commits; use
    it with care.
source manpages: cdgit-initcdplan9-touchgit-addgit-commitgit-clonecdgit-checkoutgit-clonecdgit-checkoutcdechogit-addgit-commitgit-checkoutgit-fetchgit-pushcdechogit-logcdgit-fetchgit-pushechogit-pushcdechogit-log