commit bd81cfb71a41e5cf095af0f518978f2f6123cd9c from: Stefan Sperling date: Sun Apr 19 08:57:07 2020 UTC clarify wording in got.1 related to local changes/commits/branches commit - d7c4e80d2ab26252096219f540ed037f15985472 commit + bd81cfb71a41e5cf095af0f518978f2f6123cd9c blob - b84282bef22d3da71b92b44f01c5b99ce6602bc5 blob + b6a8a5486fe953fc59245fdd11ce1796d3f9b0a1 --- got/got.1 +++ got/got.1 @@ -234,8 +234,7 @@ Cannot be used together with any of the other options .It Fl m Create the cloned repository as a mirror of the original repository. This is useful if the cloned repository will not be used to store -local changes as created by -.Cm got commit . +locally created commits. .Pp The repository's .Pa config @@ -245,7 +244,7 @@ option enabled, such that .Cm got fetch or .Xr git-fetch 1 -will write incoming changes directly to local branches in the +will write incoming changes directly to branches in the .Dq refs/heads/ reference namespace, rather than to branches in the .Dq refs/remotes/ @@ -254,9 +253,11 @@ This avoids the usual requirement of having to run .Cm got rebase after .Cm got fetch -in order to make incoming changes appear on local branches. -But maintaining local changes in the cloned repository becomes difficult -since local changes will be at risk of being discarded whenever incoming +in order to make incoming changes appear on branches in the +.Dq refs/heads/ +namespace. +But maintaining custom changes in the cloned repository becomes difficult +since such changes will be at risk of being discarded whenever incoming changes are fetched. .It Fl q Suppress progress reporting output. @@ -325,9 +326,10 @@ By default, branch references in the reference namespace will be updated to point at the newly fetched commits. The .Cm got rebase -command can then be used to make new changes visible on local branches in the +command can then be used to make new changes visible on branches in the .Dq refs/heads/ -namespace, merging incoming changes with local changes as necessary. +namespace, merging incoming changes with the changes on those branches +as necessary. .Pp If the repository was created as a mirror with .Cm got clone -m @@ -338,7 +340,7 @@ the remote repository. If those branches contained local commits, these commits will no longer be reachable via a reference and will therefore be at risk of being discarded by Git's garbage collector. -Maintaining local changes in a mirror repository is therefore discouraged. +Maintaining custom changes in a mirror repository is therefore discouraged. .Pp In any case, references in the .Dq refs/tags/ @@ -433,8 +435,7 @@ in which case references will be mapped directly into .Dq refs/ namespace. .Pp -Once a reference has been fetched, a local branch based on it can be -created with +Once a reference has been fetched, a branch based on it can be created with .Cm got branch if needed. .Pp @@ -754,7 +755,7 @@ is never traversed. .El .It Cm diff Oo Fl C Ar number Oc Oo Fl r Ar repository-path Oc Oo Fl s Oc Oo Fl w Oc Op Ar object1 Ar object2 | Ar path When invoked within a work tree with less than two arguments, display -uncommitted changes in the work tree. +local changes in the work tree. If a .Ar path is specified, only show changes within this path. @@ -783,7 +784,7 @@ work tree, use the repository path associated with thi .It Fl s Show changes staged with .Cm got stage -instead of showing local changes. +instead of showing local changes in the work tree. This option is only valid when .Cm got diff is invoked in a work tree. @@ -1087,7 +1088,7 @@ The options for are as follows: .Bl -tag -width Ds .It Fl f -Perform the operation even if a file contains uncommitted modifications. +Perform the operation even if a file contains local modifications. .It Fl k Keep affected files on disk. .It Fl R @@ -1102,7 +1103,7 @@ is a directory. Short alias for .Cm remove . .It Cm revert Oo Fl p Oc Oo Fl F Ar response-script Oc Oo Fl R Oc Ar path ... -Revert any uncommitted changes in files at the specified paths. +Revert any local changes in files at the specified paths in a work tree. File contents will be overwritten with those contained in the work tree's base commit. There is no way to bring discarded changes back after