@@ -99,18 +99,30 @@ contains the newly released code.
9999
100100 .. tab-item :: gh cli
101101
102- Run the following command, substituting for the downstream fork owner
103- and repo name. Without the ``-b `` option, only the default branch will
104- be synced. You may want to sync both ``stable `` and ``main ``,
105- particularly at a release.
106-
107102 .. code-block :: shell
108103
109- gh repo sync < OWNER > /< REPO > -b < BRANCH >
104+ gh repo sync [ < owner > /< repo > ] [ -b < branch > ]
110105
111- The synced branch will still only exist in the remote repository. If
112- you require them in a local clone make sure to ``fetch `` or ``pull ``
113- the repository.
106+ * The command syncs changes from a remote repository to your fork or
107+ local copy.
108+ * Both ``<owner>/<repo> `` and ``-b <branch> `` are optional.
109+ * If ``-b <branch> `` isn't specified, it will sync the default branch
110+ (main),
111+ * There is no built-in ``gh repo sync `` option for all branches,
112+ therefore the user needs to specify a branch name when not syncing the
113+ not the default branch.
114+ * If you run this without ``<owner>/<repo> ``, it will sync changes from
115+ the remote origin to your local clone.
116+
117+ * Doing this will not update your remote fork, this will also require
118+ a ``git push `` command.
119+
120+ * By providing your username and fork name to ``<owner>/<repo> ``, it
121+ will sync changes from the upstream parent repository into your remote
122+ fork.
123+
124+ * Doing this will not update your local clone, this will also require
125+ a ``git pull `` command.
114126
115127 .. tab-item :: git commands
116128
@@ -135,6 +147,6 @@ contains the newly released code.
135147 .. tip ::
136148
137149 Note that the options above will result in the synced branch being available
138- in different locations. Using the web browser or `` gh `` will not update your
150+ in different locations. Using the web browser will not update your
139151 local clone while using ``git `` commands will not update the remote
140- repository without pushing.
152+ repository without pushing. `` gh `` can be used to update either.
0 commit comments