2 .\" Copyright (c) 2017 Martin Pieuchot
3 .\" Copyright (c) 2018, 2019, 2020 Stefan Sperling
5 .\" Permission to use, copy, modify, and distribute this software for any
6 .\" purpose with or without fee is hereby granted, provided that the above
7 .\" copyright notice and this permission notice appear in all copies.
9 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
30 is a version control system which stores the history of tracked files
31 in a Git repository, as used by the Git version control system.
32 This repository format is described in
33 .Xr git-repository 5 .
38 version control system because every copy of a repository is writeable.
39 Modifications made to files can be synchronized between repositories
44 must be checked out from the repository for modification.
45 Checked out files are stored in a
47 which can be placed at an arbitrary directory in the filesystem hierarchy.
48 The on-disk format of this work tree is described in
52 provides global and command-specific options.
53 Global options must precede the command name, and are as follows:
54 .Bl -tag -width tenletters
56 Display usage information and exit immediately.
58 Display program version and exit immediately.
64 .Bl -tag -width checkout
71 .Op Fl r Ar repository-path
75 Create an initial commit in a repository from the file hierarchy
78 The created commit will not have any parent commits, i.e. it will be a
80 Also create a new reference which provides a branch name for the newly
82 Show the path of each imported file to indicate progress.
88 environment variable to be set,
89 unless an author has been configured in
95 configuration settings can be obtained from the repository's
97 file or from Git's global
108 If this option is not specified, a branch corresponding to the repository's
109 HEAD reference will be used.
110 Use of this option is required if the branch resolved via the repository's
111 HEAD reference already exists.
113 Ignore files or directories with a name which matches the specified
115 This option may be specified multiple times to build a list of ignore patterns.
118 follows the globbing rules documented in
120 Ignore patterns which end with a slash,
122 will only match directories.
124 Use the specified log message when creating the new commit.
129 opens a temporary file in an editor where a log message can be written.
130 .It Fl r Ar repository-path
131 Use the repository at the specified path.
132 If not specified, assume the repository is located at or above the current
140 .Op Fl R Ar reference
145 Clone a Git repository at the specified
151 is specified, the directory name will be derived from the name of the
154 will refuse to run if the
160 specifies a protocol scheme, a server hostname, an optional port number
161 separated from the hostname by a colon, and a path to the repository on
163 .Lk scheme://hostname:port/path/to/repository
165 The following protocol schemes are supported:
166 .Bl -tag -width git+ssh
168 The Git protocol as implemented by the
171 Use of this protocol is discouraged since it supports neither authentication
174 The Git protocol wrapped in an authenticated and encrypted
177 With this protocol the hostname may contain an embedded username for
182 Short alias for git+ssh.
185 Objects in the cloned repository are stored in a pack file which is downloaded
187 This pack file will then be indexed to facilitate access to the objects stored
189 If any objects in the pack file are stored in deltified form, all deltas will
190 be fully resolved in order to compute the ID of such objects.
191 This can take some time.
192 More details about the pack file format are documented in
193 .Xr git-repository 5 .
196 creates a remote repository entry in the
200 files of the cloned repository to store the
206 arguments for future use by
216 Fetch all branches from the remote repository's
218 reference namespace and set
219 .Cm fetch_all_branches
220 in the cloned repository's
222 file for future use by
224 If this option is not specified, a branch resolved via the remote
225 repository's HEAD reference will be fetched.
226 Cannot be used together with the
232 from the remote repository's
235 This option may be specified multiple times to build a list of branches
237 If the branch corresponding to the remote repository's HEAD reference is not
238 in this list, the cloned repository's HEAD reference will be set to the first
239 branch which was fetched.
240 If this option is not specified, a branch resolved via the remote
241 repository's HEAD reference will be fetched.
242 Cannot be used together with the
246 List branches and tags available for fetching from the remote repository
247 and exit immediately.
248 Cannot be used together with any of the other options except
253 Create the cloned repository as a mirror of the original repository.
254 This is useful if the cloned repository will not be used to store
255 locally created commits.
261 files will be set up with the
263 option enabled, such that
267 will write incoming changes directly to branches in the
269 reference namespace, rather than to branches in the
272 This avoids the usual requirement of having to run
276 in order to make incoming changes appear on branches in the
279 But maintaining custom changes in the cloned repository becomes difficult
280 since such changes will be at risk of being discarded whenever incoming
283 Suppress progress reporting output.
284 The same option will be passed to
287 .It Fl R Ar reference
288 In addition to the branches and tags that will be fetched, fetch an arbitrary
290 from the remote repository's
293 This option may be specified multiple times to build a list of additional
297 may either be a path to a specific reference, or a reference namespace
298 which will cause all references in this namespace to be fetched.
300 Each reference will be mapped into the cloned repository's
302 namespace, unless the
304 option is used to mirror references directly into the cloned repository's
309 will refuse to fetch references from the remote repository's
318 to print debugging messages to standard error output.
319 This option will be passed to
322 Multiple -v options increase the verbosity.
330 .Op Fl R Ar reference
331 .Op Fl r Ar repository-path
332 .Op Ar remote-repository
335 Fetch new changes from a remote repository.
337 .Ar remote-repository
341 The remote repository's URL is obtained from the corresponding entry in
345 file of the local repository, as created by
348 By default, any branches configured in
351 .Ar remote-repository
355 is invoked in a work tree then this work tree's current branch will be
356 fetched, too, provided it is present on the server.
357 If no branches to fetch can be found in
359 or via a work tree, or said branches are not found on the server, a branch
360 resolved via the remote repository's HEAD reference will be fetched.
361 Likewise, if a HEAD reference for the
362 .Ar remote-repository
363 exists but its target no longer matches the remote HEAD, then
364 the new target branch will be fetched.
365 This default behaviour can be overridden with the
371 New changes will be stored in a separate pack file downloaded from the server.
372 Optionally, separate pack files stored in the repository can be combined with
375 By default, branch references in the
377 reference namespace will be updated to point at the newly fetched commits.
380 command can then be used to make new changes visible on branches in the
382 namespace, merging incoming changes with the changes on those branches
385 If the repository was created as a mirror with
387 then all branches in the
389 namespace will be updated directly to match the corresponding branches in
390 the remote repository.
391 If those branches contained local commits, these commits will no longer be
392 reachable via a reference and will therefore be at risk of being discarded
393 by Git's garbage collector or
394 .Cm gotadmin cleanup .
395 Maintaining custom changes in a mirror repository is therefore discouraged.
397 In any case, references in the
399 namespace will always be fetched and mapped directly to local references
400 in the same namespace.
407 Fetch all branches from the remote repository's
410 This option can be enabled by default for specific repositories in
412 Cannot be used together with the
418 from the remote repository's
421 This option may be specified multiple times to build a list of branches
423 Cannot be used together with the
427 Delete branches and tags from the local repository which are no longer
428 present in the remote repository.
429 Only references are deleted.
430 Any commit, tree, tag, and blob objects belonging to deleted branches or
431 tags remain in the repository and may be removed separately with
432 Git's garbage collector or
433 .Cm gotadmin cleanup .
435 List branches and tags available for fetching from the remote repository
436 and exit immediately.
437 Cannot be used together with any of the other options except
443 Suppress progress reporting output.
444 The same option will be passed to
447 .It Fl R Ar reference
448 In addition to the branches and tags that will be fetched, fetch an arbitrary
450 from the remote repository's
453 This option may be specified multiple times to build a list of additional
457 may either be a path to a specific reference, or a reference namespace
458 which will cause all references in this namespace to be fetched.
460 Each reference will be mapped into the local repository's
462 namespace, unless the local repository was created as a mirror with
464 in which case references will be mapped directly into the local repository's
468 Once a reference has been fetched, a branch based on it can be created with
473 will refuse to fetch references from the remote repository's
478 .It Fl r Ar repository-path
479 Use the repository at the specified path.
480 If not specified, assume the repository is located at or above the current
482 If this directory is a
484 work tree, use the repository path associated with this work tree.
486 Allow existing references in the
488 namespace to be updated if they have changed on the server.
489 If not specified, only new tag references will be created.
494 to print debugging messages to standard error output.
495 The same option will be passed to
498 Multiple -v options increase the verbosity.
501 Delete all references which correspond to a particular
502 .Ar remote-repository
503 instead of fetching new changes.
504 This can be useful when a remote repository is being removed from
510 .Ar remote-repository
511 argument is mandatory and no other options except
518 Only references are deleted.
519 Any commit, tree, tag, and blob objects fetched from a remote repository
520 will generally be stored in pack files and may be removed separately with
522 and Git's garbage collector.
530 .Op Fl p Ar path-prefix
532 .Op Ar work-tree-path
535 Copy files from a repository into a new work tree.
536 Show the status of each affected file, using the following status codes:
537 .Bl -column YXZ description
538 .It A Ta new file was added
539 .It E Ta file already exists in work tree's meta-data
544 is not specified, either use the last component of
545 .Ar repository path ,
548 was specified use the last component of
556 Check out files from a commit on the specified
558 If this option is not specified, a branch resolved via the repository's HEAD
559 reference will be used.
561 Check out files from the specified
563 on the selected branch.
564 The expected argument is a commit ID SHA1 hash or an existing reference
565 or tag name which will be resolved to a commit ID.
566 An abbreviated hash argument will be expanded to a full SHA1 hash
567 automatically, provided the abbreviation is unique.
568 If this option is not specified, the most recent commit on the selected
573 is not contained in the selected branch, a different branch which contains
574 this commit must be specified with the
577 If no such branch is known, a new branch must be created for this
583 Checking out work trees with an unknown branch is intentionally not supported.
585 Proceed with the checkout operation even if the directory at
588 Existing files will be left intact.
589 .It Fl p Ar path-prefix
590 Restrict the work tree to a subset of the repository's tree hierarchy.
591 Only files beneath the specified
595 Silence progress output.
606 Update an existing work tree to a different
608 Change existing files in the work tree as necessary to match file contents
610 Preserve any local changes in the work tree and merge them with the
613 Files which already contain merge conflicts will not be updated to avoid
614 further complications.
615 Such files will be updated when
617 is run again after merge conflicts have been resolved.
618 If the conflicting changes are no longer needed, affected files can be
625 Show the status of each affected file, using the following status codes:
626 .Bl -column YXZ description
627 .It U Ta file was updated and contained no local changes
628 .It G Ta file was updated and local changes were merged cleanly
629 .It C Ta file was updated and conflicts occurred during merge
630 .It D Ta file was deleted
631 .It d Ta file's deletion was prevented by local modifications
632 .It A Ta new file was added
633 .It \(a~ Ta versioned file is obstructed by a non-regular file
634 .It ! Ta a missing versioned file was restored
635 .It # Ta file was not updated because it contains merge conflicts
636 .It ? Ta changes destined for an unversioned file were not merged
641 is specified, update the entire work tree.
642 Otherwise, restrict the update operation to files at or within the
644 Each path is required to exist in the update operation's target commit.
645 Files in the work tree outside specified paths will remain unchanged and
646 will retain their previously recorded base commit.
649 commands may refuse to run while the work tree contains files from
650 multiple base commits.
651 The base commit of such a work tree can be made consistent by running
653 across the entire work tree.
656 is incompatible with the
661 cannot update paths with staged changes.
662 If changes have been staged with
664 these changes must first be committed with
674 Switch the work tree's branch reference to the specified
676 before updating the work tree.
677 This option requires that all paths in the work tree are updated.
679 As usual, any local changes in the work tree will be preserved.
680 This can be useful when switching to a newly created branch in order
681 to commit existing local changes to this branch.
683 Any local changes must be dealt with separately in order to obtain a
684 work tree with pristine file contents corresponding exactly to the specified
686 Such changes could first be committed to a different branch with
688 or could be discarded with
691 Update the work tree to the specified
693 The expected argument is a commit ID SHA1 hash or an existing reference
694 or tag name which will be resolved to a commit ID.
695 An abbreviated hash argument will be expanded to a full SHA1 hash
696 automatically, provided the abbreviation is unique.
697 If this option is not specified, the most recent commit on the work tree's
700 Silence progress output.
706 .Op Fl S Ar status-codes
707 .Op Fl s Ar status-codes
711 Show the current modification status of files in a work tree,
712 using the following status codes:
713 .Bl -column YXZ description
714 .It M Ta modified file
715 .It A Ta file scheduled for addition in next commit
716 .It D Ta file scheduled for deletion in next commit
717 .It C Ta modified or added file which contains merge conflicts
718 .It ! Ta versioned file was expected on disk but is missing
719 .It \(a~ Ta versioned file is obstructed by a non-regular file
720 .It ? Ta unversioned item not tracked by
722 .It m Ta modified file modes (executable bit only)
723 .It N Ta non-existent
725 specified on the command line
730 is specified, show modifications in the entire work tree.
731 Otherwise, show modifications at or within the specified paths.
733 If changes have been staged with
735 staged changes are shown in the second output column, using the following
737 .Bl -column YXZ description
738 .It M Ta file modification is staged
739 .It A Ta file addition is staged
740 .It D Ta file deletion is staged
743 Changes created on top of staged changes are indicated in the first column:
744 .Bl -column YXZ description
745 .It MM Ta file was modified after earlier changes have been staged
746 .It MA Ta file was modified after having been staged for addition
754 Show unversioned files even if they match an ignore pattern.
755 .It Fl S Ar status-codes
756 Suppress the output of files with a modification status matching any of the
757 single-character status codes contained in the
760 Any combination of codes from the above list of possible status codes
762 For staged files, status codes displayed in either column will be matched.
763 Cannot be used together with the
766 .It Fl s Ar status-codes
767 Only show files with a modification status matching any of the
768 single-character status codes contained in the
771 Any combination of codes from the above list of possible status codes
773 For staged files, status codes displayed in either column will be matched.
774 Cannot be used together with the
779 For compatibility with
790 files in each traversed directory and will not display unversioned files
791 which match these patterns.
792 Ignore patterns which end with a slash,
794 will only match directories.
799 supports consecutive asterisks,
801 which will match an arbitrary amount of directories.
805 only supports a single ignore pattern per line.
809 does not support negated ignore patterns prefixed with
811 and gives no special significance to the location of path component separators,
820 .Op Fl r Ar repository-path
821 .Op Fl S Ar search-pattern
825 Display history of a repository.
828 is specified, show only commits which modified this path.
829 If invoked in a work tree, the
831 is interpreted relative to the current working directory,
832 and the work tree's path prefix is implicitly prepended.
833 Otherwise, the path is interpreted relative to the repository root.
840 Display individual commits which were merged into the current branch
844 shows the linear history of the current branch only.
846 Set the number of context lines shown in diffs with
848 By default, 3 lines of context are shown.
850 Start traversing history at the specified
852 The expected argument is a commit ID SHA1 hash or an existing reference
853 or tag name which will be resolved to a commit ID.
854 An abbreviated hash argument will be expanded to a full SHA1 hash
855 automatically, provided the abbreviation is unique.
856 If this option is not specified, default to the work tree's current branch
857 if invoked in a work tree, or to the repository's HEAD reference.
859 Display diffstat of changes introduced in each commit.
860 Cannot be used with the
864 Limit history traversal to a given number of commits.
865 If this option is not specified, a default limit value of zero is used,
866 which is treated as an unbounded limit.
868 .Ev GOT_LOG_DEFAULT_LIMIT
869 environment variable may be set to change this default value.
871 Display the list of file paths changed in each commit, using the following
873 .Bl -column YXZ description
874 .It M Ta modified file
875 .It D Ta file was deleted
876 .It A Ta new file was added
877 .It m Ta modified file modes (executable bit only)
880 Cannot be used with the
884 Display the patch of modifications made in each commit.
887 is specified, only show the patch of modifications at or within this path.
888 Cannot be used with the
892 Determine a set of commits to display as usual, but display these commits
894 .It Fl r Ar repository-path
895 Use the repository at the specified path.
896 If not specified, assume the repository is located at or above the current
898 If this directory is a
900 work tree, use the repository path associated with this work tree.
901 .It Fl S Ar search-pattern
902 If specified, show only commits with a log message, author name,
903 committer name, or ID SHA1 hash matched by the extended regular
906 Lines in committed patches will be matched if
909 File paths changed by a commit will be matched if
912 Regular expression syntax is documented in
915 Display a short one-line summary of each commit, instead of the default
917 Cannot be used together with the
923 Stop traversing commit history immediately after the specified
926 This option has no effect if the specified
936 .Op Fl r Ar repository-path
937 .Op Ar object1 Ar object2 | Ar path ...
940 When invoked within a work tree without any arguments, display all
941 local changes in the work tree.
944 arguments are specified, only show changes within the specified paths.
946 If two arguments are provided, treat each argument as a reference, a tag
947 name, or an object ID SHA1 hash, and display differences between the
948 corresponding objects.
949 Both objects must be of the same type (blobs, trees, or commits).
950 An abbreviated hash argument will be expanded to a full SHA1 hash
951 automatically, provided the abbreviation is unique.
952 If none of these interpretations produce a valid result or if the
957 is running in a work tree, attempt to interpret the two arguments as paths.
964 Treat file contents as ASCII text even if binary data is detected.
966 Set the number of context lines shown in the diff.
967 By default, 3 lines of context are shown.
969 Show differences between commits in the repository.
970 This option may be used up to two times.
971 When used only once, show differences between the specified
973 and its first parent commit.
974 When used twice, show differences between the two specified commits.
976 The expected argument is a commit ID SHA1 hash or an existing reference
977 or tag name which will be resolved to a commit ID.
978 An abbreviated hash argument will be expanded to a full SHA1 hash
979 automatically, provided the abbreviation is unique.
983 option is used, all non-option arguments will be interpreted as paths.
986 arguments are provided, only show differences for the specified paths.
988 Cannot be used together with the
992 Display diffstat of changes before the actual diff by annotating each file path
993 or blob hash being diffed with the total number of lines added and removed.
994 A summary line will display the total number of changes across all files.
996 Interpret all arguments as paths only.
997 This option can be used to resolve ambiguity in cases where paths
998 look like tag names, reference names, or object IDs.
999 This option is only valid when
1001 is invoked in a work tree.
1002 .It Fl r Ar repository-path
1003 Use the repository at the specified path.
1004 If not specified, assume the repository is located at or above the current
1006 If this directory is a
1008 work tree, use the repository path associated with this work tree.
1010 Show changes staged with
1012 instead of showing local changes in the work tree.
1013 This option is only valid when
1015 is invoked in a work tree.
1017 Ignore whitespace-only changes.
1023 .Op Fl r Ar repository-path
1027 Display line-by-line history of a file at the specified path.
1034 Start traversing history at the specified
1036 The expected argument is a commit ID SHA1 hash or an existing reference
1037 or tag name which will be resolved to a commit ID.
1038 An abbreviated hash argument will be expanded to a full SHA1 hash
1039 automatically, provided the abbreviation is unique.
1040 .It Fl r Ar repository-path
1041 Use the repository at the specified path.
1042 If not specified, assume the repository is located at or above the current
1044 If this directory is a
1046 work tree, use the repository path associated with this work tree.
1053 .Op Fl r Ar repository-path
1057 Display a listing of files and directories at the specified
1058 directory path in the repository.
1059 Entries shown in this listing may carry one of the following trailing
1061 .Bl -column YXZ description
1062 .It @ Ta entry is a symbolic link
1063 .It / Ta entry is a directory
1064 .It * Ta entry is an executable file
1065 .It $ Ta entry is a Git submodule
1068 Symbolic link entries are also annotated with the target path of the link.
1072 is specified, list the repository path corresponding to the current
1073 directory of the work tree, or the root directory of the repository
1074 if there is no work tree.
1081 List files and directories as they appear in the specified
1083 The expected argument is a commit ID SHA1 hash or an existing reference
1084 or tag name which will be resolved to a commit ID.
1085 An abbreviated hash argument will be expanded to a full SHA1 hash
1086 automatically, provided the abbreviation is unique.
1088 Show object IDs of files (blob objects) and directories (tree objects).
1090 Recurse into sub-directories in the repository.
1091 .It Fl r Ar repository-path
1092 Use the repository at the specified path.
1093 If not specified, assume the repository is located at or above the current
1095 If this directory is a
1097 work tree, use the repository path associated with this work tree.
1103 .Op Fl r Ar repository-path
1104 .Op Fl s Ar reference
1107 Manage references in a repository.
1109 References may be listed, created, deleted, and changed.
1110 When creating, deleting, or changing a reference the specified
1112 must be an absolute reference name, i.e. it must begin with
1120 Create a reference or change an existing reference.
1121 The reference with the specified
1123 will point at the specified
1127 argument is a ID SHA1 hash or an existing reference or tag name which will
1128 be resolved to the ID of a corresponding commit, tree, tag, or blob object.
1129 Cannot be used together with any other options except
1132 Delete the reference with the specified
1134 from the repository.
1135 Any commit, tree, tag, and blob objects belonging to deleted references
1136 remain in the repository and may be removed separately with
1137 Git's garbage collector or
1138 .Cm gotadmin cleanup .
1139 Cannot be used together with any other options except
1142 List references in the repository.
1145 is specified, list all existing references in the repository.
1148 is a reference namespace, list all references in this namespace.
1149 Otherwise, show only the reference with the given
1151 Cannot be used together with any other options except
1155 .It Fl r Ar repository-path
1156 Use the repository at the specified path.
1157 If not specified, assume the repository is located at or above the current
1159 If this directory is a
1161 work tree, use the repository path associated with this work tree.
1162 .It Fl s Ar reference
1163 Create a symbolic reference, or change an existing symbolic reference.
1164 The symbolic reference with the specified
1166 will point at the specified
1168 which must already exist in the repository.
1169 Care should be taken not to create loops between references when
1170 this option is used.
1171 Cannot be used together with any other options except
1174 Sort listed references by modification time (most recently modified first)
1175 instead of sorting by lexicographical order.
1176 Use of this option requires the
1178 option to be used as well.
1186 .Op Fl r Ar repository-path
1190 Create, list, or delete branches.
1192 Local branches are managed via references which live in the
1194 reference namespace.
1197 command creates references in this namespace only.
1199 When deleting branches, the specified
1203 reference namespace first.
1204 If no corresponding branch is found, the
1206 namespace will be searched next.
1208 If invoked in a work tree without any arguments, print the name of the
1209 work tree's current branch.
1213 argument is passed, attempt to create a branch reference with the given name.
1214 By default the new branch reference will point at the latest commit on the
1215 work tree's current branch if invoked in a work tree, and otherwise to a commit
1216 resolved via the repository's HEAD reference.
1218 If invoked in a work tree, once the branch was created successfully
1219 switch the work tree's head reference to the newly created branch and
1220 update files across the entire work tree, just like
1221 .Cm got update -b Ar name
1223 Show the status of each affected file, using the following status codes:
1224 .Bl -column YXZ description
1225 .It U Ta file was updated and contained no local changes
1226 .It G Ta file was updated and local changes were merged cleanly
1227 .It C Ta file was updated and conflicts occurred during merge
1228 .It D Ta file was deleted
1229 .It A Ta new file was added
1230 .It \(a~ Ta versioned file is obstructed by a non-regular file
1231 .It ! Ta a missing versioned file was restored
1239 Make a newly created branch reference point at the specified
1243 argument is a commit ID SHA1 hash or an existing reference
1244 or tag name which will be resolved to a commit ID.
1246 Delete the branch with the specified
1252 reference namespace.
1254 Only the branch reference is deleted.
1255 Any commit, tree, and blob objects belonging to the branch
1256 remain in the repository and may be removed separately with
1257 Git's garbage collector or
1258 .Cm gotadmin cleanup .
1260 List all existing branches in the repository, including copies of remote
1261 repositories' branches in the
1263 reference namespace.
1265 If invoked in a work tree, the work tree's current branch is shown
1266 with one the following annotations:
1267 .Bl -column YXZ description
1268 .It * Ta work tree's base commit matches the branch tip
1269 .It \(a~ Ta work tree's base commit is out-of-date
1272 Do not switch and update the work tree after creating a new branch.
1273 .It Fl r Ar repository-path
1274 Use the repository at the specified path.
1275 If not specified, assume the repository is located at or above the current
1277 If this directory is a
1279 work tree, use the repository path associated with this work tree.
1281 Sort listed branches by modification time (most recently modified first)
1282 instead of sorting by lexicographical order.
1285 reference namespace are listed before branches in
1288 Use of this option requires the
1290 option to be used as well.
1297 .Op Fl r Ar repository-path
1298 .Op Fl s Ar signer-id
1301 Manage tags in a repository.
1303 Tags are managed via references which live in the
1305 reference namespace.
1308 command operates on references in this namespace only.
1309 References in this namespace point at tag objects which contain a pointer
1310 to another object, a tag message, as well as author and timestamp information.
1312 Attempt to create a tag with the given
1314 and make this tag point at the given
1316 If no commit is specified, default to the latest commit on the work tree's
1317 current branch if invoked in a work tree, and to a commit resolved via
1318 the repository's HEAD reference otherwise.
1325 Make the newly created tag reference point at the specified
1329 argument is a commit ID SHA1 hash or an existing reference or tag name which
1330 will be resolved to a commit ID.
1331 An abbreviated hash argument will be expanded to a full SHA1 hash
1332 automatically, provided the abbreviation is unique.
1334 List all existing tags in the repository instead of creating a new tag.
1337 argument is passed, show only the tag with the given
1340 Use the specified tag message when creating the new tag.
1345 opens a temporary file in an editor where a tag message can be written.
1346 .It Fl r Ar repository-path
1347 Use the repository at the specified path.
1348 If not specified, assume the repository is located at or above the current
1350 If this directory is a
1352 work tree, use the repository path associated with this work tree.
1353 .It Fl s Ar signer-id
1354 While creating a new tag, sign this tag with the identity given in
1357 For SSH-based signatures,
1359 is the path to a file which may refer to either a private SSH key,
1360 or a public SSH key with the private half available via
1363 will sign the tag object by invoking
1367 command, using the signature namespace
1369 for compatibility with
1372 Verify tag object signatures.
1375 is specified, show and verify the tag object with the provided name.
1376 Otherwise, list all tag objects and verify signatures where present.
1379 verifies SSH-based signatures by invoking
1382 .Fl Y Cm verify Fl f Ar allowed_signers .
1387 otherwise verification is impossible.
1390 During SSH signature creation and verification this option will be passed to
1392 Multiple -v options increase the verbosity.
1398 command will not delete tags or change existing tags.
1399 If a tag must be deleted, the
1401 command may be used to delete a tag's reference.
1402 This should only be done if the tag has not already been copied to
1409 Schedule unversioned files in a work tree for addition to the
1410 repository in the next commit.
1411 By default, files which match a
1413 ignore pattern will not be added.
1420 Add files even if they match a
1424 Permit recursion into directories.
1425 If this option is not specified,
1427 will refuse to run if a specified
1435 .Op Fl s Ar status-codes
1439 Remove versioned files from a work tree and schedule them for deletion
1440 from the repository in the next commit.
1447 Perform the operation even if a file contains local modifications,
1448 and do not raise an error if a specified
1450 does not exist on disk.
1452 Keep affected files on disk.
1454 Permit recursion into directories.
1455 If this option is not specified,
1457 will refuse to run if a specified
1460 .It Fl s Ar status-codes
1461 Only delete files with a modification status matching one of the
1462 single-character status codes contained in the
1465 The following status codes may be specified:
1466 .Bl -column YXZ description
1467 .It M Ta modified file (this implies the
1470 .It ! Ta versioned file expected on disk but missing
1478 .Op Fl p Ar strip-count
1484 to files in a work tree.
1485 Files added or removed by a patch will be scheduled for addition or removal in
1488 The patch must be in the unified diff format as produced by
1495 diff when invoked with their
1500 argument is provided, read unified diff data from standard input instead.
1504 contains multiple patches, then attempt to apply each of them in sequence.
1506 Show the status of each affected file, using the following status codes:
1507 .Bl -column XYZ description
1508 .It M Ta file was modified
1509 .It G Ta file was merged using a merge-base found in the repository
1510 .It C Ta file was merged and conflicts occurred during merge
1511 .It D Ta file was deleted
1512 .It A Ta file was added
1513 .It # Ta failed to patch the file
1516 If a change does not match at its exact line number, attempt to
1517 apply it somewhere else in the file if a good spot can be found.
1518 Otherwise, the patch will fail to apply.
1522 will refuse to apply a patch if certain preconditions are not met.
1523 Files to be deleted must already be under version control, and must
1524 not have been scheduled for deletion already.
1525 Files to be added must not yet be under version control and must not
1526 already be present on disk.
1527 Files to be modified must already be under version control and may not
1528 contain conflict markers.
1530 If an error occurs, the
1532 operation will be aborted.
1533 Any changes made to the work tree up to this point will be left behind.
1534 Such changes can be viewed with
1536 and can be reverted with
1545 Attempt to locate files within the specified
1547 for use as a merge-base for 3-way merges.
1548 Ideally, the specified
1550 should contain versions of files which the changes contained in the
1553 Files will be located by path, relative to the repository root.
1556 option is used then leading path components will be stripped
1557 before paths are looked up in the repository.
1561 option is not used then
1563 will attempt to locate merge-bases via object IDs found in
1565 meta-data, such as produced by
1571 option is only recommended in the absence of such meta-data.
1573 In case no merge-base is available for a file, changes will be applied
1574 without doing a 3-way merge.
1575 Changes which do not apply cleanly may then be rejected entirely, rather
1576 than producing merge conflicts in the patched target file.
1578 Do not make any modifications to the work tree.
1579 This can be used to check whether a patch would apply without issues.
1582 contains diffs that affect the same file multiple times, the results
1583 displayed may be incorrect.
1584 .It Fl p Ar strip-count
1585 Specify the number of leading path components to strip from paths
1594 path prefixes generated by
1596 will be recognized and stripped automatically.
1598 Reverse the patch before applying it.
1604 .Op Fl F Ar response-script
1608 Revert any local changes in files at the specified paths in a work tree.
1609 File contents will be overwritten with those contained in the
1610 work tree's base commit.
1611 There is no way to bring discarded changes back after
1614 If a file was added with
1616 it will become an unversioned file again.
1617 If a file was deleted with
1619 it will be restored.
1625 .It Fl F Ar response-script
1633 responses line-by-line from the specified
1635 file instead of prompting interactively.
1637 Instead of reverting all changes in files, interactively select or reject
1638 changes to revert based on
1644 (quit reverting this file) responses.
1645 If a file is in modified status, individual patches derived from the
1646 modified file content can be reverted.
1647 Files in added or deleted status may only be reverted in their entirety.
1649 Permit recursion into directories.
1650 If this option is not specified,
1652 will refuse to run if a specified
1666 Create a new commit in the repository from changes in a work tree
1667 and use this commit as the new base commit for the work tree.
1670 is specified, commit all changes in the work tree.
1671 Otherwise, commit changes at or within the specified paths.
1673 If changes have been explicitly staged for commit with
1675 only commit staged changes and reject any specified paths which
1676 have not been staged.
1679 opens a temporary file in an editor where a log message can be written
1687 options are used together.
1689 Show the status of each affected file, using the following status codes:
1690 .Bl -column YXZ description
1691 .It M Ta modified file
1692 .It D Ta file was deleted
1693 .It A Ta new file was added
1694 .It m Ta modified file modes (executable bit only)
1697 Files which are not part of the new commit will retain their previously
1698 recorded base commit.
1701 commands may refuse to run while the work tree contains files from
1702 multiple base commits.
1703 The base commit of such a work tree can be made consistent by running
1705 across the entire work tree.
1709 command requires the
1711 environment variable to be set,
1712 unless an author has been configured in
1718 configuration settings can be
1719 obtained from the repository's
1721 file or from Git's global
1730 Set author information in the newly created commit to
1732 This is useful when committing changes on behalf of someone else.
1735 argument must use the same format as the
1737 environment variable.
1739 In addition to storing author information, the newly created commit
1742 information which is obtained, as usual, from the
1744 environment variable, or
1746 or Git configuration settings.
1748 Allow committing files in conflicted status.
1750 Committing files with conflict markers should generally be avoided.
1751 Cases where conflict markers must be stored in the repository for
1752 some legitimate reason should be very rare.
1753 There are usually ways to avoid storing conflict markers verbatim by
1754 applying appropriate programming tricks.
1756 Use the prepared log message stored in the file found at
1758 when creating the new commit.
1760 opens a temporary file in an editor where the prepared log message can be
1761 reviewed and edited further if needed.
1762 Cannot be used together with the
1766 Use the specified log message when creating the new commit.
1767 Cannot be used together with the
1771 This option prevents
1773 from opening the commit message in an editor.
1774 It has no effect unless it is used together with the
1776 option and is intended for non-interactive use such as scripting.
1778 This option prevents
1780 from generating a diff of the to-be-committed changes in a temporary file
1781 which can be viewed while editing a commit message.
1783 Allow the addition of symbolic links which point outside of the path space
1784 that is under version control.
1787 will reject such symbolic links due to safety concerns.
1790 may decide to represent such a symbolic link as a regular file which contains
1791 the link's target path, rather than creating an actual symbolic link which
1792 points outside of the work tree.
1793 Use of this option is discouraged because external mechanisms such as
1795 are better suited for managing symbolic links to paths not under
1800 will refuse to run if certain preconditions are not met.
1801 If the work tree's current branch is not in the
1803 reference namespace, new commits may not be created on this branch.
1804 Local changes may only be committed if they are based on file content
1805 found in the most recent commit on the work tree's branch.
1806 If a path is found to be out of date,
1808 must be used first in order to merge local changes with changes made
1816 .Op Fl r Ar repository-path
1818 .Op Ar remote-repository
1821 Send new changes to a remote repository.
1823 .Ar remote-repository
1827 The remote repository's URL is obtained from the corresponding entry in
1831 file of the local repository, as created by
1834 All objects corresponding to new changes will be written to a temporary
1835 pack file which is then uploaded to the server.
1836 Upon success, references in the
1838 reference namespace of the local repository will be updated to point at
1839 the commits which have been sent.
1841 By default, changes will only be sent if they are based on up-to-date
1842 copies of relevant branches in the remote repository.
1843 If any changes to be sent are based on out-of-date copies or would
1844 otherwise break linear history of existing branches, new changes must
1845 be fetched from the server with
1847 and local branches must be rebased with
1854 option can be used to make exceptions to these requirements.
1861 Send all branches from the local repository's
1863 reference namespace.
1866 option is equivalent to listing all branches with multiple
1869 Cannot be used together with the
1875 from the local repository's
1877 reference namespace.
1878 This option may be specified multiple times to build a list of branches
1880 If this option is not specified, default to the work tree's current branch
1881 if invoked in a work tree, or to the repository's HEAD reference.
1882 Cannot be used together with the
1886 Delete the specified
1888 from the remote repository's
1890 reference namespace.
1891 This option may be specified multiple times to build a list of branches
1894 Only references are deleted.
1895 Any commit, tree, tag, and blob objects belonging to deleted branches
1896 may become subject to deletion by Git's garbage collector running on
1899 Requesting deletion of branches results in an error if the server
1900 does not support this feature or disallows the deletion of branches
1901 based on its configuration.
1903 Attempt to force the server to overwrite existing branches or tags
1904 in the remote repository, even when
1908 would usually be required before changes can be sent.
1909 The server may reject forced requests regardless, depending on its
1912 Any commit, tree, tag, and blob objects belonging to overwritten branches
1913 or tags may become subject to deletion by Git's garbage collector running
1918 reference namespace is globally shared between all repositories.
1921 option to overwrite tags is discouraged because it can lead to
1922 inconsistencies between the tags present in different repositories.
1923 In general, creating a new tag with a different name is recommended
1924 instead of overwriting an existing tag.
1928 option is particularly discouraged if changes being sent are based
1929 on an out-of-date copy of a branch in the remote repository.
1930 Instead of using the
1932 option, new changes should
1935 and local branches should be rebased with
1937 followed by another attempt to send the changes.
1941 option should only be needed in situations where the remote repository's
1942 copy of a branch or tag is known to be out-of-date and is considered
1944 The risks of creating inconsistencies between different repositories
1945 should also be taken into account.
1947 Suppress progress reporting output.
1948 The same option will be passed to
1951 .It Fl r Ar repository-path
1952 Use the repository at the specified path.
1953 If not specified, assume the repository is located at or above the current
1955 If this directory is a
1957 work tree, use the repository path associated with this work tree.
1959 Attempt to send all tags from the local repository's
1961 reference namespace.
1964 option is equivalent to listing all tags with multiple
1967 Cannot be used together with the
1973 from the local repository's
1975 reference namespace, in addition to any branches that are being sent.
1978 option may be specified multiple times to build a list of tags to send.
1979 No tags will be sent if the
1983 Raise an error if the specified
1985 already exists in the remote repository, unless the
1987 option is used to overwrite the server's copy of the tag.
1988 In general, creating a new tag with a different name is recommended
1989 instead of overwriting an existing tag.
1991 Cannot be used together with the
1998 to print debugging messages to standard error output.
1999 The same option will be passed to
2002 Multiple -v options increase the verbosity.
2012 Merge changes from a single
2017 should be on a different branch than the work tree's base commit.
2018 The expected argument is a reference or a commit ID SHA1 hash.
2019 An abbreviated hash argument will be expanded to a full SHA1 hash
2020 automatically, provided the abbreviation is unique.
2022 Show the status of each affected file, using the following status codes:
2023 .Bl -column YXZ description
2024 .It G Ta file was merged
2025 .It C Ta file was merged and conflicts occurred during merge
2026 .It ! Ta changes destined for a missing file were not merged
2027 .It D Ta file was deleted
2028 .It d Ta file's deletion was prevented by local modifications
2029 .It A Ta new file was added
2030 .It \(a~ Ta changes destined for a non-regular file were not merged
2031 .It ? Ta changes destined for an unversioned file were not merged
2034 The merged changes will appear as local changes in the work tree, which
2037 amended manually or with further
2043 If invoked in a work tree where no
2048 operation is taking place,
2050 creates a record of commits which have been merged into the work tree.
2051 When a file changed by
2055 the log messages of relevant merged commits will then appear in the editor,
2056 where the messages should be further adjusted to convey the reasons for
2057 cherrypicking the changes.
2058 Upon exiting the editor, if the time stamp of the log message file
2059 is unchanged or the log message is empty,
2061 will fail with an unmodified or empty log message error.
2063 If all the changes in all files touched by a given commit are discarded,
2066 this commit's log message record will also disappear.
2069 will refuse to run if certain preconditions are not met.
2070 If the work tree contains multiple base commits, it must first be updated
2071 to a single base commit with
2073 If any relevant files already contain merge conflicts, these
2074 conflicts must be resolved first.
2082 Display a list of commit log messages recorded by cherrypick operations,
2083 represented by references in the
2084 .Dq refs/got/worktree
2085 reference namespace.
2088 is specified, only show the log message of the specified commit.
2090 If invoked in a work tree, only log messages recorded by cherrypick operations
2091 in the current work tree will be displayed.
2092 Otherwise, all commit log messages will be displayed irrespective of the
2093 work tree in which they were created.
2094 This option cannot be used with
2097 Delete log messages created by previous cherrypick operations, represented by
2099 .Dq refs/got/worktree
2100 reference namespace.
2103 is specified, only delete the log message of the specified commit.
2105 If invoked in a work tree, only log messages recorded by cherrypick operations
2106 in the current work tree will be deleted.
2107 Otherwise, all commit log messages will be deleted irrespective of the
2108 work tree in which they were created.
2109 This option cannot be used with
2120 Reverse-merge changes from a single
2125 should be on the same branch as the work tree's base commit.
2126 The expected argument is a reference or a commit ID SHA1 hash.
2127 An abbreviated hash argument will be expanded to a full SHA1 hash
2128 automatically, provided the abbreviation is unique.
2130 Show the status of each affected file, using the following status codes:
2131 .Bl -column YXZ description
2132 .It G Ta file was merged
2133 .It C Ta file was merged and conflicts occurred during merge
2134 .It ! Ta changes destined for a missing file were not merged
2135 .It D Ta file was deleted
2136 .It d Ta file's deletion was prevented by local modifications
2137 .It A Ta new file was added
2138 .It \(a~ Ta changes destined for a non-regular file were not merged
2139 .It ? Ta changes destined for an unversioned file were not merged
2142 The reverse-merged changes will appear as local changes in the work tree,
2143 which may be viewed with
2145 amended manually or with further
2151 If invoked in a work tree where no
2156 operation is taking place,
2158 creates a record of commits which have been reverse-merged into the work tree.
2159 When a file changed by
2163 the log messages of relevant reverse-merged commits will then appear in
2164 the editor, where the messages should be further adjusted to convey the
2165 reasons for backing out the changes.
2166 Upon exiting the editor, if the time stamp of the log message file
2167 is unchanged or the log message is empty,
2169 will fail with an unmodified or empty log message error.
2171 If all the changes in all files touched by a given commit are discarded,
2174 this commit's log message record will also disappear.
2177 will refuse to run if certain preconditions are not met.
2178 If the work tree contains multiple base commits, it must first be updated
2179 to a single base commit with
2181 If any relevant files already contain merge conflicts, these
2182 conflicts must be resolved first.
2190 Display a list of commit log messages recorded by backout operations,
2191 represented by references in the
2192 .Dq refs/got/worktree
2193 reference namespace.
2196 is specified, only show the log message of the specified commit.
2198 If invoked in a work tree, only log messages recorded by backout operations
2199 in the current work tree will be displayed.
2200 Otherwise, all commit log messages will be displayed irrespective of the
2201 work tree in which they were created.
2202 This option cannot be used with
2205 Delete log messages created by previous backout operations, represented by
2207 .Dq refs/got/worktree
2208 reference namespace.
2211 is specified, only delete the log message of the specified commit.
2213 If invoked in a work tree, only log messages recorded by backout operations
2214 in the current work tree will be deleted.
2215 Otherwise, all commit log messages will be deleted irrespective of the
2216 work tree in which they were created.
2217 This option cannot be used with
2228 Rebase commits on the specified
2230 onto the tip of the current branch of the work tree.
2233 must share common ancestry with the work tree's current branch.
2234 Rebasing begins with the first descendant commit of the youngest
2235 common ancestor commit shared by the specified
2237 and the work tree's current branch, and stops once the tip commit
2244 is used as intended, the specified
2246 represents a local commit history and may already contain changes
2247 that are not yet visible in any other repositories.
2248 The work tree's current branch, which must be set with
2252 operation, represents a branch from a remote repository which shares
2253 a common history with the specified
2255 but has progressed, and perhaps diverged, due to commits added to the
2258 Rebased commits are accumulated on a temporary branch which the work tree
2259 will remain switched to throughout the entire rebase operation.
2260 Commits on this branch represent the same changes with the same log
2261 messages as their counterparts on the original
2263 but with different commit IDs.
2264 Once rebasing has completed successfully, the temporary branch becomes
2265 the new version of the specified
2267 and the work tree is automatically switched to it.
2268 If author information is available via the
2270 environment variable,
2276 configuration settings, this author information will be used to identify
2281 Old commits in their pre-rebase state are automatically backed up in the
2282 .Dq refs/got/backup/rebase
2283 reference namespace.
2284 As long as these references are not removed older versions of rebased
2285 commits will remain in the repository and can be viewed with the
2288 Removal of these references makes objects which become unreachable via
2289 any reference subject to removal by Git's garbage collector or
2290 .Cm gotadmin cleanup .
2292 While rebasing commits, show the status of each affected file,
2293 using the following status codes:
2294 .Bl -column YXZ description
2295 .It G Ta file was merged
2296 .It C Ta file was merged and conflicts occurred during merge
2297 .It ! Ta changes destined for a missing file were not merged
2298 .It D Ta file was deleted
2299 .It d Ta file's deletion was prevented by local modifications
2300 .It A Ta new file was added
2301 .It \(a~ Ta changes destined for a non-regular file were not merged
2302 .It ? Ta changes destined for an unversioned file were not merged
2305 If merge conflicts occur, the rebase operation is interrupted and may
2306 be continued once conflicts have been resolved.
2307 If any files with destined changes are found to be missing or unversioned,
2308 or if files could not be deleted due to differences in deleted content,
2309 the rebase operation will be interrupted to prevent potentially incomplete
2310 changes from being committed to the repository without user intervention.
2311 The work tree may be modified as desired and the rebase operation can be
2312 continued once the changes present in the work tree are considered complete.
2313 Alternatively, the rebase operation may be aborted which will leave
2315 unmodified and the work tree switched back to its original branch.
2317 If a merge conflict is resolved in a way which renders the merged
2318 change into a no-op change, the corresponding commit will be elided
2319 when the rebase operation continues.
2322 will refuse to run if certain preconditions are not met.
2327 reference namespace, the branch may not be rebased.
2328 If the work tree is not yet fully updated to the tip commit of its
2329 branch, then the work tree must first be updated with
2331 If changes have been staged with
2333 these changes must first be committed with
2337 If the work tree contains local changes, these changes must first be
2344 contains changes to files outside of the work tree's path prefix,
2345 the work tree cannot be used to rebase this branch.
2354 commands will refuse to run while a rebase operation is in progress.
2355 Other commands which manipulate the work tree may be used for
2356 conflict resolution purposes.
2360 is already based on the work tree's current branch, then no commits
2361 need to be rebased and
2363 will simply switch the work tree to the specified
2365 and update files in the work tree accordingly.
2372 Abort an interrupted rebase operation.
2373 If this option is used, no other command-line arguments are allowed.
2375 Allow a rebase operation to continue with files in conflicted status.
2376 This option should generally be avoided, and can only be used with the
2380 Continue an interrupted rebase operation.
2381 If this option is used, no other command-line arguments are allowed.
2383 Show a list of past rebase operations, represented by references in the
2384 .Dq refs/got/backup/rebase
2385 reference namespace.
2387 Display the author, date, and log message of each backed up commit,
2388 the object ID of the corresponding post-rebase commit, and
2389 the object ID of their common ancestor commit.
2390 Given these object IDs,
2397 options can be used to examine the history of either version of the branch,
2402 option can be used to create a new branch from a pre-rebase state if desired.
2406 is specified, only show commits which at some point in time represented this
2408 Otherwise, list all backed up commits for any branches.
2410 If this option is used,
2412 does not require a work tree.
2413 None of the other options can be used together with
2416 Delete backups created by past rebase operations, represented by references
2418 .Dq refs/got/backup/rebase
2419 reference namespace.
2423 is specified, only delete backups which at some point in time represented
2425 Otherwise, delete all references found within
2426 .Dq refs/got/backup/rebase .
2428 Any commit, tree, tag, and blob objects belonging to deleted backups
2429 remain in the repository and may be removed separately with
2430 Git's garbage collector or
2431 .Cm gotadmin cleanup .
2433 If this option is used,
2435 does not require a work tree.
2436 None of the other options can be used together with
2443 .Op Fl F Ar histedit-script
2447 Edit commit history between the work tree's current base commit and
2448 the tip commit of the work tree's current branch.
2452 command requires the
2454 environment variable to be set,
2455 unless an author has been configured in
2461 configuration settings can be obtained from the repository's
2463 file or from Git's global
2469 operation, the work tree's current branch must be set with
2471 to the branch which should be edited, unless this branch is already the
2472 current branch of the work tree.
2473 The tip of this branch represents the upper bound (inclusive) of commits
2478 Furthermore, the work tree's base commit
2481 to a point in this branch's commit history where editing should begin.
2482 This commit represents the lower bound (non-inclusive) of commits touched
2487 Editing of commit history is controlled via a
2489 which can be written in an editor based on a template, passed on the
2490 command line, or generated with the
2498 The format of the histedit script is line-based.
2499 Each line in the script begins with a command name, followed by
2500 whitespace and an argument.
2501 For most commands, the expected argument is a commit ID SHA1 hash.
2502 Any remaining text on the line is ignored.
2503 Lines which begin with the
2505 character are ignored entirely.
2507 The available histedit script commands are as follows:
2508 .Bl -column YXZ pick-commit
2509 .It Cm pick Ar commit Ta Use the specified commit as it is.
2510 .It Cm edit Ar commit Ta Apply the changes from the specified commit, but
2511 then interrupt the histedit operation for amending, without creating a commit.
2512 While the histedit operation is interrupted arbitrary files may be edited,
2513 and commands which manipulate the work tree can be used freely.
2518 commands can be used to add new files or remove existing ones.
2521 command can be used to eliminate arbitrary changes from files in the work tree.
2524 command may be used to prepare a subset of changes for inclusion in the
2528 command can be used to insert arbitrary commits into the edited history.
2529 Regular editing of history must eventually be resumed by running
2530 .Cm got histedit -c .
2531 .It Cm fold Ar commit Ta Combine the specified commit with the next commit
2532 listed further below that will be used.
2533 .It Cm drop Ar commit Ta Remove this commit from the edited history.
2534 .It Cm mesg Oo Ar log-message Oc Ta Create a new log message for the commit of
2539 command on the previous line of the histedit script.
2542 argument provides a new single-line log message to use.
2545 argument is omitted, open an editor where a new log message can be written.
2548 Every commit in the history being edited must be mentioned in the script.
2549 Lines may be re-ordered to change the order of commits in the edited history.
2550 No commit may be listed more than once.
2552 Edited commits are accumulated on a temporary branch which the work tree
2553 will remain switched to throughout the entire histedit operation.
2554 Once history editing has completed successfully, the temporary branch becomes
2555 the new version of the work tree's branch and the work tree is automatically
2558 Old commits in their pre-histedit state are automatically backed up in the
2559 .Dq refs/got/backup/histedit
2560 reference namespace.
2561 As long as these references are not removed older versions of edited
2562 commits will remain in the repository and can be viewed with the
2565 Removal of these references makes objects which become unreachable via
2566 any reference subject to removal by Git's garbage collector or
2567 .Cm gotadmin cleanup .
2569 While merging commits, show the status of each affected file,
2570 using the following status codes:
2571 .Bl -column YXZ description
2572 .It G Ta file was merged
2573 .It C Ta file was merged and conflicts occurred during merge
2574 .It ! Ta changes destined for a missing file were not merged
2575 .It D Ta file was deleted
2576 .It d Ta file's deletion was prevented by local modifications
2577 .It A Ta new file was added
2578 .It \(a~ Ta changes destined for a non-regular file were not merged
2579 .It ? Ta changes destined for an unversioned file were not merged
2582 If merge conflicts occur, the histedit operation is interrupted and may
2583 be continued once conflicts have been resolved.
2584 If any files with destined changes are found to be missing or unversioned,
2585 or if files could not be deleted due to differences in deleted content,
2586 the histedit operation will be interrupted to prevent potentially incomplete
2587 changes from being committed to the repository without user intervention.
2588 The work tree may be modified as desired and the histedit operation can be
2589 continued once the changes present in the work tree are considered complete.
2590 Alternatively, the histedit operation may be aborted which will leave
2591 the work tree switched back to its original branch.
2593 If a merge conflict is resolved in a way which renders the merged
2594 change into a no-op change, the corresponding commit will be elided
2595 when the histedit operation continues.
2598 will refuse to run if certain preconditions are not met.
2599 If the work tree's current branch is not in the
2601 reference namespace, the history of the branch may not be edited.
2602 If the work tree contains multiple base commits, it must first be updated
2603 to a single base commit with
2605 If changes have been staged with
2607 these changes must first be committed with
2611 If the work tree contains local changes, these changes must first be
2616 If the edited history contains changes to files outside of the work tree's
2617 path prefix, the work tree cannot be used to edit the history of this branch.
2625 commands will refuse to run while a histedit operation is in progress.
2626 Other commands which manipulate the work tree may be used, and the
2628 command may be used to commit arbitrary changes to the temporary branch
2629 while the histedit operation is interrupted.
2636 Abort an interrupted histedit operation.
2637 If this option is used, no other command-line arguments are allowed.
2639 Allow a histedit operation to continue with files in conflicted status.
2640 This option should generally be avoided, and can only be used with the
2644 Continue an interrupted histedit operation.
2645 If this option is used, no other command-line arguments are allowed.
2648 This option is a quick equivalent to a histedit script which drops all
2652 option can only be used when starting a new histedit operation.
2653 If this option is used, no other command-line arguments are allowed.
2655 Interrupt the histedit operation for editing after merging each commit.
2656 This option is a quick equivalent to a histedit script which uses the
2658 command for all commits.
2661 option can only be used when starting a new histedit operation.
2662 If this option is used, no other command-line arguments are allowed.
2663 .It Fl F Ar histedit-script
2666 instead of opening a temporary file in an editor where a histedit script
2669 Fold all commits into a single commit.
2670 This option is a quick equivalent to a histedit script which folds all
2671 commits, combining them all into one commit.
2674 option can only be used when starting a new histedit operation.
2675 If this option is used, no other command-line arguments are allowed.
2677 Show a list of past histedit operations, represented by references in the
2678 .Dq refs/got/backup/histedit
2679 reference namespace.
2681 Display the author, date, and log message of each backed up commit,
2682 the object ID of the corresponding post-histedit commit, and
2683 the object ID of their common ancestor commit.
2684 Given these object IDs,
2691 options can be used to examine the history of either version of the branch,
2696 option can be used to create a new branch from a pre-histedit state if desired.
2700 is specified, only show commits which at some point in time represented this
2702 Otherwise, list all backed up commits for any branches.
2704 If this option is used,
2706 does not require a work tree.
2707 None of the other options can be used together with
2710 Edit log messages only.
2711 This option is a quick equivalent to a histedit script which edits
2712 only log messages but otherwise leaves every picked commit as-is.
2715 option can only be used when starting a new histedit operation.
2716 If this option is used, no other command-line arguments are allowed.
2718 Delete backups created by past histedit operations, represented by references
2720 .Dq refs/got/backup/histedit
2721 reference namespace.
2725 is specified, only delete backups which at some point in time represented
2727 Otherwise, delete all references found within
2728 .Dq refs/got/backup/histedit .
2730 Any commit, tree, tag, and blob objects belonging to deleted backups
2731 remain in the repository and may be removed separately with
2732 Git's garbage collector or
2733 .Cm gotadmin cleanup .
2735 If this option is used,
2737 does not require a work tree.
2738 None of the other options can be used together with
2742 .It Cm integrate Ar branch
2744 Integrate the specified
2746 into the work tree's current branch.
2747 Files in the work tree are updated to match the contents on the integrated
2749 and the reference of the work tree's branch is changed to point at the
2750 head commit of the integrated
2753 Both branches can be considered equivalent after integration since they
2754 will be pointing at the same commit.
2755 Both branches remain available for future work, if desired.
2756 In case the integrated
2758 is no longer needed it may be deleted with
2761 Show the status of each affected file, using the following status codes:
2762 .Bl -column YXZ description
2763 .It U Ta file was updated
2764 .It D Ta file was deleted
2765 .It A Ta new file was added
2766 .It \(a~ Ta versioned file is obstructed by a non-regular file
2767 .It ! Ta a missing versioned file was restored
2771 will refuse to run if certain preconditions are not met.
2772 Most importantly, the
2774 must have been rebased onto the work tree's current branch with
2776 before it can be integrated, in order to linearize commit history and
2777 resolve merge conflicts.
2778 If the work tree contains multiple base commits, it must first be updated
2779 to a single base commit with
2781 If changes have been staged with
2783 these changes must first be committed with
2787 If the work tree contains local changes, these changes must first be
2799 Create a merge commit based on the current branch of the work tree and
2802 If a linear project history is desired, then use of
2804 should be preferred over
2806 However, even strictly linear projects may require merge commits in order
2807 to merge in new versions of third-party code stored on vendor branches
2811 Merge commits are commits based on multiple parent commits.
2812 The tip commit of the work tree's current branch, which must be set with
2816 operation, will be used as the first parent.
2817 The tip commit of the specified
2819 will be used as the second parent.
2821 No ancestral relationship between the two branches is required.
2822 If the two branches have already been merged previously, only new changes
2825 It is not possible to create merge commits with more than two parents.
2826 If more than one branch needs to be merged, then multiple merge commits
2827 with two parents each can be created in sequence.
2829 While merging changes found on the
2831 into the work tree, show the status of each affected file,
2832 using the following status codes:
2833 .Bl -column YXZ description
2834 .It G Ta file was merged
2835 .It C Ta file was merged and conflicts occurred during merge
2836 .It ! Ta changes destined for a missing file were not merged
2837 .It D Ta file was deleted
2838 .It d Ta file's deletion was prevented by local modifications
2839 .It A Ta new file was added
2840 .It \(a~ Ta changes destined for a non-regular file were not merged
2841 .It ? Ta changes destined for an unversioned file were not merged
2844 If merge conflicts occur, the merge operation is interrupted and conflicts
2845 must be resolved before the merge operation can continue.
2846 If any files with destined changes are found to be missing or unversioned,
2847 or if files could not be deleted due to differences in deleted content,
2848 the merge operation will be interrupted to prevent potentially incomplete
2849 changes from being committed to the repository without user intervention.
2850 The work tree may be modified as desired and the merge can be continued
2851 once the changes present in the work tree are considered complete.
2852 Alternatively, the merge operation may be aborted which will leave
2853 the work tree's current branch unmodified.
2856 will refuse to run if certain preconditions are not met.
2859 is based on the work tree's current branch, then no merge commit can
2862 may be used to integrate the
2865 If the work tree is not yet fully updated to the tip commit of its
2866 branch, then the work tree must first be updated with
2868 If the work tree contains multiple base commits, it must first be updated
2869 to a single base commit with
2871 If changes have been staged with
2873 these changes must first be committed with
2877 If the work tree contains local changes, these changes must first be
2884 contains changes to files outside of the work tree's path prefix,
2885 the work tree cannot be used to merge this branch.
2895 commands will refuse to run while a merge operation is in progress.
2896 Other commands which manipulate the work tree may be used for
2897 conflict resolution purposes.
2904 Abort an interrupted merge operation.
2905 If this option is used, no other command-line arguments are allowed.
2907 Allow a merge operation to continue with files in conflicted status.
2908 This option should generally be avoided, and can only be used with the
2912 Continue an interrupted merge operation.
2913 If this option is used, no other command-line arguments are allowed.
2915 Merge changes into the work tree as usual but do not create a merge
2917 The merge result can be adjusted as desired before a merge commit is
2920 Alternatively, the merge may be aborted with
2927 .Op Fl F Ar response-script
2931 Stage local changes for inclusion in the next commit.
2934 is specified, stage all changes in the work tree.
2935 Otherwise, stage changes at or within the specified paths.
2936 Paths may be staged if they are added, modified, or deleted according to
2939 Show the status of each affected file, using the following status codes:
2940 .Bl -column YXZ description
2941 .It A Ta file addition has been staged
2942 .It M Ta file modification has been staged
2943 .It D Ta file deletion has been staged
2946 Staged file contents are saved in newly created blob objects in the repository.
2947 These blobs will be referred to by tree objects once staged changes have been
2950 Staged changes affect the behaviour of
2955 While paths with staged changes exist, the
2957 command will refuse to commit any paths which do not have staged changes.
2958 Local changes created on top of staged changes can only be committed if
2959 the path is staged again, or if the staged changes are committed first.
2962 command will show both local changes and staged changes.
2965 command is able to display local changes relative to staged changes,
2966 and to display staged changes relative to the repository.
2969 command cannot revert staged changes but may be used to revert
2970 local changes created on top of staged changes.
2976 .It Fl F Ar response-script
2984 responses line-by-line from the specified
2986 file instead of prompting interactively.
2988 Instead of staging new changes, list paths which are already staged,
2989 along with the IDs of staged blob objects and stage status codes.
2990 If paths were provided on the command line, show the staged paths
2991 among the specified paths.
2992 Otherwise, show all staged paths.
2994 Instead of staging the entire content of a changed file, interactively
2995 select or reject changes for staging based on
2999 (reject change), and
3001 (quit staging this file) responses.
3002 If a file is in modified status, individual patches derived from the
3003 modified file content can be staged.
3004 Files in added or deleted status may only be staged or rejected in
3007 Allow staging of symbolic links which point outside of the path space
3008 that is under version control.
3011 will reject such symbolic links due to safety concerns.
3014 may decide to represent such a symbolic link as a regular file which contains
3015 the link's target path, rather than creating an actual symbolic link which
3016 points outside of the work tree.
3017 Use of this option is discouraged because external mechanisms such as
3019 are better suited for managing symbolic links to paths not under
3024 will refuse to run if certain preconditions are not met.
3025 If a file contains merge conflicts, these conflicts must be resolved first.
3026 If a file is found to be out of date relative to the head commit on the
3027 work tree's current branch, the file must be updated with
3029 before it can be staged (however, this does not prevent the file from
3030 becoming out-of-date at some point after having been staged).
3037 commands will refuse to run while staged changes exist.
3038 If staged changes cannot be committed because a staged path
3039 is out of date, the path must be unstaged with
3041 before it can be updated with
3043 and may then be staged again if necessary.
3048 .Op Fl F Ar response-script
3052 Merge staged changes back into the work tree and put affected paths
3053 back into non-staged status.
3056 is specified, unstage all staged changes across the entire work tree.
3057 Otherwise, unstage changes at or within the specified paths.
3059 Show the status of each affected file, using the following status codes:
3060 .Bl -column YXZ description
3061 .It G Ta file was unstaged
3062 .It C Ta file was unstaged and conflicts occurred during merge
3063 .It ! Ta changes destined for a missing file were not merged
3064 .It D Ta file was staged as deleted and still is deleted
3065 .It d Ta file's deletion was prevented by local modifications
3066 .It \(a~ Ta changes destined for a non-regular file were not merged
3073 .It Fl F Ar response-script
3081 responses line-by-line from the specified
3083 file instead of prompting interactively.
3085 Instead of unstaging the entire content of a changed file, interactively
3086 select or reject changes for unstaging based on
3090 (keep change staged), and
3092 (quit unstaging this file) responses.
3093 If a file is staged in modified status, individual patches derived from the
3094 staged file content can be unstaged.
3095 Files staged in added or deleted status may only be unstaged in their entirety.
3101 .Op Fl r Ar repository-path
3104 Parse and print contents of objects to standard output in a line-based
3106 Content of commit, tree, and tag objects is printed in a way similar
3107 to the actual content stored in such objects.
3108 Blob object contents are printed as they would appear in files on disk.
3110 Attempt to interpret each argument as a reference, a tag name, or
3111 an object ID SHA1 hash.
3112 References will be resolved to an object ID.
3113 Tag names will resolved to a tag object.
3114 An abbreviated hash argument will be expanded to a full SHA1 hash
3115 automatically, provided the abbreviation is unique.
3117 If none of the above interpretations produce a valid result, or if the
3119 option is used, attempt to interpret the argument as a path which will
3120 be resolved to the ID of an object found at this path in the repository.
3127 Look up paths in the specified
3129 If this option is not used, paths are looked up in the commit resolved
3130 via the repository's HEAD reference.
3131 The expected argument is a commit ID SHA1 hash or an existing reference
3132 or tag name which will be resolved to a commit ID.
3133 An abbreviated hash argument will be expanded to a full SHA1 hash
3134 automatically, provided the abbreviation is unique.
3136 Interpret all arguments as paths only.
3137 This option can be used to resolve ambiguity in cases where paths
3138 look like tag names, reference names, or object IDs.
3139 .It Fl r Ar repository-path
3140 Use the repository at the specified path.
3141 If not specified, assume the repository is located at or above the current
3143 If this directory is a
3145 work tree, use the repository path associated with this work tree.
3147 .It Cm info Op Ar path ...
3148 Display meta-data stored in a work tree.
3153 The work tree to use is resolved implicitly by walking upwards from the
3154 current working directory.
3158 arguments are specified, show additional per-file information for tracked
3159 files located at or within these paths.
3162 argument corresponds to the work tree's root directory, display information
3163 for all tracked files.
3166 .Bl -tag -width GOT_IGNORE_GITCONFIG
3168 The author's name and email address, such as
3169 .Dq An Flan Hacker Aq Mt flan_hacker@openbsd.org .
3179 may fail to parse commits without an email address in author data,
3183 environment variables with a missing email address.
3185 .Ev GOT_AUTHOR will be overridden by configuration settings in
3191 configuration settings in the repository's
3198 configuration settings contained in Git's global
3200 configuration file will only be used if neither
3204 environment variable provide author information.
3205 .It Ev GOT_IGNORE_GITCONFIG
3206 If this variable is set then any remote repository definitions or author
3207 information found in Git configuration files will be ignored.
3208 .It Ev GOT_LOG_DEFAULT_LIMIT
3209 The default limit on the number of commits traversed by
3211 If set to zero, the limit is unbounded.
3212 This variable will be silently ignored if it is set to a non-numeric value.
3213 .It Ev VISUAL , EDITOR
3214 The editor spawned by
3222 text editor will be spawned.
3225 .Bl -tag -width packed-refs -compact
3227 Repository-wide configuration settings for
3231 configuration file located in the root directory of a Git repository
3232 supersedes any relevant settings in Git's
3236 .It Pa .got/got.conf
3237 Worktree-specific configuration settings for
3241 configuration file in the
3243 meta-data directory of a work tree supersedes any relevant settings in
3246 configuration file and Git's
3253 Enable tab-completion of
3258 .Dl $ set -A complete_got_1 -- $(got -h 2>&1 | sed -n s/commands://p)
3260 Clone an existing Git repository for use with
3264 .Dl $ got clone ssh://git@github.com/openbsd/src.git
3266 Use of HTTP URLs currently requires
3270 .Dl $ git clone --bare https://github.com/openbsd/src.git
3272 Alternatively, for quick and dirty local testing of
3274 a new Git repository could be created and populated with files,
3275 e.g. from a temporary CVS checkout located at
3278 .Dl $ gotadmin init /var/git/src.git
3279 .Dl $ got import -r /var/git/src.git -I CVS -I obj /tmp/src
3281 Check out a work tree from the Git repository to /usr/src:
3283 .Dl $ got checkout /var/git/src.git /usr/src
3285 View local changes in a work tree directory:
3287 .Dl $ got diff | less
3289 In a work tree, display files in a potentially problematic state:
3291 .Dl $ got status -s 'C!~?'
3293 Interactively revert selected local changes in a work tree directory:
3295 .Dl $ got revert -p -R\ .
3297 In a work tree or a git repository directory, list all branch references:
3301 As above, but list the most recently modified branches only:
3303 .Dl $ got branch -lt | head
3305 In a work tree or a git repository directory, create a new branch called
3306 .Dq unified-buffer-cache
3307 which is forked off the
3311 .Dl $ got branch -c master unified-buffer-cache
3313 Switch an existing work tree to the branch
3314 .Dq unified-buffer-cache .
3315 Local changes in the work tree will be preserved and merged if necessary:
3317 .Dl $ got update -b unified-buffer-cache
3319 Create a new commit from local changes in a work tree directory.
3320 This new commit will become the head commit of the work tree's current branch:
3324 In a work tree or a git repository directory, view changes committed in
3325 the 3 most recent commits to the work tree's branch, or the branch resolved
3326 via the repository's HEAD reference, respectively:
3328 .Dl $ got log -p -l 3
3330 As above, but display changes in the order in which
3332 could apply them in sequence:
3334 .Dl $ got log -p -l 3 -R
3336 In a work tree or a git repository directory, log the history of a subdirectory:
3338 .Dl $ got log sys/uvm
3340 While operating inside a work tree, paths are specified relative to the current
3341 working directory, so this command will log the subdirectory
3344 .Dl $ cd sys/uvm && got log\ .
3346 And this command has the same effect:
3348 .Dl $ cd sys/dev/usb && got log ../../uvm
3350 And this command displays work tree meta-data about all tracked files:
3353 .Dl $ got info\ . | less
3355 Add new files and remove obsolete files in a work tree directory:
3357 .Dl $ got add sys/uvm/uvm_ubc.c
3358 .Dl $ got remove sys/uvm/uvm_vnode.c
3360 Create a new commit from local changes in a work tree directory
3361 with a pre-defined log message.
3363 .Dl $ got commit -m 'unify the buffer cache'
3365 Alternatively, create a new commit from local changes in a work tree
3366 directory with a log message that has been prepared in the file
3369 .Dl $ got commit -F /tmp/msg
3371 Update any work tree checked out from the
3372 .Dq unified-buffer-cache
3373 branch to the latest commit on this branch:
3377 Roll file content on the unified-buffer-cache branch back by one commit,
3378 and then fetch the rolled-back change into the work tree as a local change
3379 to be amended and perhaps committed again:
3381 .Dl $ got backout unified-buffer-cache
3382 .Dl $ got commit -m 'roll back previous'
3383 .Dl $ # now back out the previous backout :-)
3384 .Dl $ got backout unified-buffer-cache
3386 Fetch new changes on the remote repository's
3388 branch, making them visible on the local repository's
3395 In a repository created with a HTTP URL and
3396 .Cm git clone --bare
3399 command must be used instead:
3401 .Dl $ cd /var/git/src.git
3402 .Dl $ git fetch origin master:refs/remotes/origin/master
3406 branch to merge the new changes that are now visible on the
3411 .Dl $ got update -b origin/master
3412 .Dl $ got rebase master
3415 .Dq unified-buffer-cache
3416 branch on top of the new head commit of the
3420 .Dl $ got update -b master
3421 .Dl $ got rebase unified-buffer-cache
3423 Create a patch from all changes on the unified-buffer-cache branch.
3424 The patch can be mailed out for review and applied to
3428 .Dl $ got diff master unified-buffer-cache > /tmp/ubc.diff
3430 Edit the entire commit history of the
3431 .Dq unified-buffer-cache
3434 .Dl $ got update -b unified-buffer-cache
3435 .Dl $ got update -c master
3438 Before working against existing branches in a repository cloned with
3439 .Cm git clone --bare
3444 must be configured to map all references in the remote repository
3447 namespace of the local repository.
3448 This can be achieved by setting Git's
3449 .Pa remote.origin.fetch
3450 configuration variable to the value
3451 .Dq +refs/heads/*:refs/remotes/origin/*
3456 .Dl $ cd /var/git/repo
3457 .Dl $ git config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*'
3461 option must be disabled:
3463 .Dl $ cd /var/git/repo
3464 .Dl $ git config remote.origin.mirror false
3466 Alternatively, the following
3468 configuration item can be added manually to the Git repository's
3472 .Dl [remote \&"origin\&"]
3474 .Dl fetch = +refs/heads/*:refs/remotes/origin/*
3477 This configuration leaves the local repository's
3479 namespace free for use by local branches checked out with
3481 and, if needed, created with
3484 .Dq refs/remotes/origin
3485 namespace can now be updated with incoming changes from the remote
3490 without extra command line arguments.
3491 Newly fetched changes can be examined with
3494 Display changes on the remote repository's version of the
3496 branch, as of the last time
3500 .Dl $ got log -c origin/master | less
3502 As shown here, most commands accept abbreviated reference names such as
3505 .Dq refs/remotes/origin/master .
3506 The latter is only needed in case of ambiguity.
3509 must be used to merge changes which are visible on the
3514 This will also merge local changes, if any, with the incoming changes:
3516 .Dl $ got update -b origin/master
3517 .Dl $ got rebase master
3519 In order to make changes committed to the
3520 .Dq unified-buffer-cache
3524 .Dq unified-buffer-cache
3525 branch must first be rebased onto the
3529 .Dl $ got update -b master
3530 .Dl $ got rebase unified-buffer-cache
3533 .Dq unified-buffer-cache
3534 branch can now be made visible on the
3538 Because the rebase operation switched the work tree to the
3539 .Dq unified-buffer-cache
3540 branch, the work tree must be switched back to the
3544 .Dl $ got update -b master
3545 .Dl $ got integrate unified-buffer-cache
3549 branch, log messages for local changes can now be amended with
3551 by other developers and any other important new information:
3553 .Dl $ got update -c origin/master
3554 .Dl $ got histedit -m
3556 If the remote repository offers write access, local changes on the
3558 branch can be sent to the remote repository with
3562 can be run without further arguments.
3563 The arguments shown here match defaults, provided the work tree's
3564 current branch is the
3568 .Dl $ got send -b master origin
3570 If the remote repository requires the HTTPS protocol, the
3572 command must be used instead:
3574 .Dl $ cd /var/git/src.git
3575 .Dl $ git push origin master
3577 When making contributions to projects which use the
3579 workflow, SSH protocol repository access needs to be set up first.
3580 Once an account has been created on a Git hosting site it should
3581 be possible to upload a public SSH key for repository access
3586 workflow will usually involve two remote repositories.
3587 In the real-life example below, the
3589 repository was forked from the
3591 repository by using the Git hosting site's web interface.
3594 file in the local repository describes both remote repositories:
3595 .Bd -literal -offset indent
3596 # Jelmers's repository, which accepts pull requests
3598 server git@github.com
3600 repository "/jelmer/dulwich"
3604 # Stefan's fork, used as the default remote repository
3606 server git@github.com
3608 repository "/stspdotname/dulwich"
3613 With this configuration, Stefan can create commits on
3614 .Dq refs/heads/master
3615 and send them to the
3617 repository by running:
3619 .Dl $ got send -b master origin
3621 The changes can now be proposed to Jelmer by opening a pull request
3622 via the Git hosting site's web interface.
3623 If Jelmer requests further changes to be made, additional commits
3624 can be created on the
3626 branch and be added to the pull request by running
3630 If Jelmer prefers additional commits to be
3632 then the following commands can be used to achieve this:
3634 .Dl $ got update -b master
3635 .Dl $ got update -c origin/master
3636 .Dl $ got histedit -f
3637 .Dl $ got send -f -b master origin
3639 In addition to reviewing the pull request in the web user interface,
3640 Jelmer can fetch the pull request's branch into his local repository
3641 and create a local branch which contains the proposed changes:
3643 .Dl $ got fetch -R refs/pull/1046/head origin
3644 .Dl $ got branch -c refs/remotes/origin/pull/1046/head pr1046
3646 Once Jelmer has accepted the pull request, Stefan can fetch the
3647 merged changes, and possibly several other new changes, by running:
3649 .Dl $ got fetch upstream
3651 The merged changes will now be visible under the reference
3652 .Dq refs/remotes/upstream/master .
3655 branch can now be rebased on top of the latest changes
3658 .Dl $ got update -b upstream/master
3659 .Dl $ got rebase master
3661 As a final step, the forked repository's copy of the master branch needs
3662 to be kept in sync by sending the new changes there:
3664 .Dl $ got send -f -b master origin
3666 If multiple pull requests need to be managed in parallel, a separate branch
3667 must be created for each pull request with
3669 Each such branch can then be used as above, in place of
3670 .Dq refs/heads/master .
3671 Changes for any accepted pull requests will still appear under
3672 .Dq refs/remotes/upstream/master,
3673 regardless of which branch was used in the forked repository to
3674 create a pull request.
3678 .Xr git-repository 5 ,
3679 .Xr got-worktree 5 ,
3683 .An Anthony J. Bentley Aq Mt bentley@openbsd.org
3684 .An Christian Weisgerber Aq Mt naddy@openbsd.org
3685 .An Hiltjo Posthuma Aq Mt hiltjo@codemadness.org
3686 .An Josh Rickmar Aq Mt jrick@zettaport.com
3687 .An Joshua Stein Aq Mt jcs@openbsd.org
3688 .An Klemens Nanni Aq Mt kn@openbsd.org
3689 .An Martin Pieuchot Aq Mt mpi@openbsd.org
3690 .An Neels Hofmeyr Aq Mt neels@hofmeyr.de
3691 .An Omar Polo Aq Mt op@openbsd.org
3692 .An Ori Bernstein Aq Mt ori@openbsd.org
3693 .An Sebastien Marie Aq Mt semarie@openbsd.org
3694 .An Stefan Sperling Aq Mt stsp@openbsd.org
3695 .An Steven McDonald Aq Mt steven@steven-mcdonald.id.au
3696 .An Theo Buehler Aq Mt tb@openbsd.org
3697 .An Thomas Adam Aq Mt thomas@xteddy.org
3698 .An Tracey Emery Aq Mt tracey@traceyemery.net
3699 .An Yang Zhong Aq Mt yzhong@freebsdfoundation.org
3706 were derived from code under copyright by:
3708 .An Caldera International
3709 .An Daniel Hartmeier
3714 .An Jean-Francois Brousseau
3720 .An Niklas Hallqvist
3725 .An Xavier Santolaria
3728 contains code contributed to the public domain by
3729 .An Austin Appleby .
3732 is a work-in-progress and some features remain to be implemented.
3734 At present, the user has to fall back on
3736 to perform some tasks.
3740 Reading from remote repositories over HTTP or HTTPS protocols requires
3745 Writing to remote repositories over HTTP or HTTPS protocols requires
3748 The creation of merge commits with more than two parent commits requires
3751 In situations where files or directories were moved around
3753 will not automatically merge changes to new locations and
3755 will usually produce better results.