3 git, git/conf, git/query, git/walk, git/clone, git/branch,
4 git/commit, git/diff, git/init, git/log, git/merge, git/push,
5 git/pull, git/rm, git/serve
6 \- Manage git repositories.
191 Git is a distributed version control system.
192 This means that each repository contains a full copy of the history.
193 This history is then synced between computers as needed.
196 These programs provide tools to manage and interoperate with
197 repositories hosted in git.
201 Git stores snapshots of the working directory.
202 Files can either be in a tracked or untracked state.
203 Each commit takes the current version of all tracked files and
204 adds them to a new commit.
206 This history is stored in the
211 tools provides a file interface to the
215 Modifications to the repository are done directly to the
217 directory, and are reflected in the file system interface.
218 This allows for easy scripting, without excessive complexity
225 is used to create a new git repository, with no code or commits.
226 The repository is created in the current directory by default.
227 Passing a directory name will cause the repository to be created
231 option will cause the repository to be initialized as a bare repository.
235 option will cause the upstream to be configured to
240 will take an existing repository, served over either the
245 The first argument is the repository to clone.
246 The second argument, optionally, specifies the location to clone into.
247 If not specified, the repository will be cloned into the last path component
248 of the clone source, with the
250 stripped off if present.
254 is used to push the current changes to a remote repository.
255 When no arguments are provided, the remote repository is taken from
256 the origin configured in
258 and only the changes on the current branch are pushed.
261 option, all branches are pushed.
264 option, the changed are pushed to
266 instead of the configured origin.
269 option, the branch is deleted from origin, instead of updated.
273 restores the named files from HEAD. When passed the -c flag, restores files from
278 behaves in a similar manner to git/push, however it gets changes from
279 the upstream repository.
280 After fetching, it checks out the changes into the working directory.
283 option, the update of the working copy is suppressed.
286 option, the changes are pulled from
288 instead of the configured origin.
292 serves repositories using the
295 By default, it serves them read-only.
298 flag, it allows pushing into repositories.
302 flag serves repositories relative to
307 serves a file system on $repo/.git/fs.
308 For full documentation, see
313 adds a file to the list of tracked files. When passed the
315 flag, the file is removed from the list of tracked files.
316 The copy of the file in the repository is left untouched.
324 creates a new commit consisting of all changes to the specified files.
325 By default, an editor is opened to prepare the commit message.
328 flag supplies the commit message directly.
331 flag revises the contents of the previous commit, reusing the message.
334 flag opens an editor to finalize the commit message, regardless of
335 whether or not it was specified explicitly or reused.
336 To amend a commit message,
338 can be used in conjuction with
345 is used to list or switch branches.
346 When invoked with no arguments, it lists the current branch.
347 To list all branches, pass the
350 To switch between branches, pass a branch name.
353 option, the branch will be created, overwriting existing branch.
356 option, the branch created is based off of
362 option, the branch is created but the files are not checked out.
365 option, the branch is deleted.
367 When switching branches, git/branch will refuse to clobber
371 option will cause git9 to attempt to merge the changes between
376 shows a history of the current branch.
377 When passed a list of files, only commits affecting
378 those files are shown.
381 option logs starting from the provided commit, instead of HEAD.
384 option shows a summary of the commit, instead of the full message.
387 option shows commits matching the query expression provided.
388 The expression is in the syntax of
393 shows the differences between the currently checked out code and
399 option, the diff is computed against
405 option, only the file statuses are
410 exports a list of commits in a format that
416 imports a commit with message, author, and
421 takes two branches and merges them filewise using
423 The next commit made will be a merge commmit.
427 takes one branch and moves it onto another.
428 On error, the remaining commits to rebase are
429 saved, and can be resumed once the conflict is
433 If the rebase is to be aborted, the
435 option will clean up the in progress rebase
436 and reset the state of the branch.
439 option will open an editor to modify the todo-list before the rebase
443 The following rebase commands are supported:
449 Apply the commit, then edit its commit message.
452 Apply the commit, then exit to allow further changes.
455 Fold the commit into the previous commit, then edit the combined
459 Fold the commit into the previous commit, discarding its commit
463 Exit to allow for manual edits or inspection before continuing.
467 is a tool for querying the git configuration.
468 The configuration key is provided as a dotted string. Spaces
469 are accepted. For example, to find the URL of the origin
470 repository, one might pass
471 .I 'remote "origin".url".
474 option, the root of the current repository is printed.
477 takes an expression describing a commit, or set of commits,
478 and resolves it to a list of commits.
481 option reverses the order of the commit list.
484 option, instead of printing the commit hashes, the full
487 path is printed. With the
489 option, the query must resolve to two commits. The blobs
490 that have changed in the commits are printed.
494 provides a tool for walking the list of tracked objects and printing their status.
495 With no arguments, it prints a list of paths prefixed with the status character.
498 character, only the paths are printed.
501 option, all output is suppressed, and only the status is printed.
504 option, the output is filtered by status code, and only matching items are printed.
507 The status characters are as follows:
510 Tracked, not modified since last commit.
513 Modified since last commit.
516 Removed from either working directory tracking list.
519 Added, does not yet exist in a commit.
523 spawns an rc subshell with a compatibility stub in
525 This compatibility stub provides enough of the unix
527 commands to run tools like
534 Refs are specified with a simple query syntax.
535 A bare hash always evaluates to itself.
536 Ref names are resolved to their hashes.
539 suffix operator finds the parent of a commit.
542 suffix operator finds the common ancestor of the previous two commits.
547 operator finds all commits between
551 Between is defined as the set of all commits which are reachable from
553 but not reachable from
558 Git9 supports URL schemes of the format
559 .BR transport://dial/repo/path .
560 The transport portion specifies the protocol to use.
561 If the transport portion is omitted, then the transport used is
565 portion is either a plan 9 dial string, or a conventional
568 For the ssh protocol, it may also include a
572 portion is the path of the repository on the server.
574 The supported transports are
575 .B ssh://, git://, hjgit://, gits://, http://,
578 Two of these are specific to git9:
584 protocol, tunnelled over tls.
586 authenticates with the server using Plan 9 authentication,
589 Any of these protocol names may be prefixed with
591 for copy-paste compatibility with Unix git.
596 In order to create a new repository, run
604 To clone an existing repository from a git server, run:
607 git/clone git://github.com/Harvey-OS/harvey
615 To set a user and email for commits, run:
618 % mkdir $home/lib/git
619 % >$home/lib/git/config echo '
622 email = ori@eigenstate.org'
628 The full git repository.
631 The configuration file for a repository.
634 The user-wide configuration for git.
635 The contents of this file are used as fallbacks for the per-repository config.
638 The system-wide configuration for git.
639 The contents of this file are used as fallbacks for the per-user config.
649 Repositories with submodules are effectively read-only.
651 There are a some of missing commands, features, and tools
653 git/compat only works within a git repository.