@@ -12,18 +12,22 @@ Options:
12
12
--version Client version
13
13
14
14
Commands:
15
- login [<username>]
16
- logout
17
- create [<name>] [<description>]
18
- get <repopath>
19
- ls [<directory>]
20
- upload
21
- download
22
- repos [<username>]
23
- info [<username>]
24
- keys [-v | --verbose]
25
- keys --add <filename>
26
- help <command>
15
+ login [<username>] | Login to the GIN services
16
+ logout | Logout from the GIN services
17
+ create [<name>] [<description>] | Create a repository on the remote server and clone it
18
+ get <repopath> | Retrieve (clone) a repository from the remote server
19
+ ls [-s, --short] [<filenames>] | List the sync status of files in a local repository
20
+ unlock [<filenames>] | Unlock files for editing
21
+ lock [<filenames>] | Lock files
22
+ upload [<filenames>] | Upload local changes to a remote repository
23
+ download [<filenames>] | Download the content of files from a remote repository
24
+ remove-content [<filenames>] | Remove the content of local files that have already been uploaded
25
+ rmc [<filenames>] | Synonym for remove-content
26
+ repos [<username>] | List available remote repositories
27
+ info [<username>] | Print user information
28
+ keys [-v, --verbose] | List the keys associated with the logged in user
29
+ keys --add <filename> | Add/upload a new public key to the GIN services
30
+ help <command> | Get help for individual commands
27
31
28
32
Use 'help' followed by a command to see full description of the command.
29
33
`
@@ -121,15 +125,15 @@ EXAMPLES
121
125
122
126
const lsHelp = `USAGE
123
127
124
- gin ls [<directory >]...
128
+ gin ls [--short, -s] [<filenames >]...
125
129
126
130
DESCRIPTION
127
131
128
132
List one or more files or the contents of directories and the status of the
129
133
files within it. With no arguments, lists the status of the files under the
130
134
current directory. Directory listings are performed recursively.
131
135
132
- The meaning of the status abbreviations is as follows:
136
+ In the short form, the meaning of the status abbreviations is as follows:
133
137
OK: The file is part of the GIN repository and its contents are
134
138
synchronised with the server.
135
139
NC: The local file is a placeholder and its contents have not been
@@ -142,38 +146,122 @@ DESCRIPTION
142
146
143
147
ARGUMENTS
144
148
145
- <directory>
149
+ --short, -s
150
+ Print listing in short form.
151
+
152
+ <filenames>
146
153
One or more directories or files to list.
147
154
`
148
155
156
+ const unlockHelp = `USAGE
157
+
158
+ gin unlock [<filenames>]...
159
+
160
+ DESCRIPTION
161
+
162
+ Unlock one or more files for editing. Files added to the repository are
163
+ left in a locked state, which allows reading but prevents editing. In order
164
+ to edit or write to a file, it must first be unlocked. When done editing,
165
+ it is recommended that a file be locked again, using the 'lock' command,
166
+ which records changes in the repository.
167
+
168
+ After performing an 'upload', 'download', or 'get', affected files are
169
+ reverted to a locked state.
170
+
171
+ Unlocking a file takes longer depending on the size of the file.
172
+
173
+ ARGUMENTS
174
+
175
+ <filenames>
176
+ One or more directories or files to unlock.
177
+ `
178
+
179
+ const lockHelp = `USAGE
180
+
181
+ gin lock [<filenames>]...
182
+
183
+ DESCRIPTION
184
+
185
+ Lock one or more files after editing. After unlocking files for editing,
186
+ using the 'unlock' command, it is recommended that they be locked again.
187
+ This records any changes made and prepares a file for upload to the GIN
188
+ server.
189
+
190
+ Locked files are replaced by symbolic links in the working directory.
191
+
192
+ After performing an 'upload', 'download', or 'get', affected files are
193
+ reverted to a locked state.
194
+
195
+ Unlocking a file takes longer depending on the size of the file.
196
+
197
+ ARGUMENTS
198
+
199
+ <filenames>
200
+ One or more directories or files to lock.
201
+ `
202
+
149
203
const uploadHelp = `USAGE
150
204
151
- gin upload
205
+ gin upload [<filenames>]...
152
206
153
207
DESCRIPTION
154
208
155
209
Upload changes made in a local repository clone to the remote repository on
156
210
the GIN server. This command must be called from within the local
157
- repository clone. All changes made will be sent to the server, including
158
- addition of new files, modifications and renaming of existing files, and
159
- file deletions.
211
+ repository clone. Specific files or directories may be specified.
212
+ All changes made will be sent to the server, including addition of new
213
+ files, modifications and renaming of existing files, and file deletions.
214
+ With no arguments, uploads the changes made under the working directory,
215
+ recursively.
216
+
217
+ ARGUMENTS
218
+
219
+ <filenames>
220
+ One or more directories of files to upload and update.
160
221
161
- This command takes no arguments.
162
222
`
163
223
164
224
const downloadHelp = `USAGE
165
225
166
- gin download
226
+ gin download [<filenames>]...
167
227
168
228
DESCRIPTION
169
229
170
- Download changes made in the remote repository on the GIN server to the
171
- local repository clone. This command must be called from within the
172
- local repository clone. All changes made on the remote server will
173
- be retrieved, including addition of new files, modifications and renaming
174
- of existing files, and file deletions .
230
+ Download the content of the listed files. The download command is intended
231
+ to be used to retrieve the content of placeholder files in a local
232
+ repository. This command must be called from within the local repository
233
+ clone. With no arguments, downloads the content for all files under the
234
+ working directory, recursively .
175
235
176
- This command takes no arguments.
236
+ ARGUMENTS
237
+
238
+ <filenames>
239
+ One or more names of files or directories to retrieve.
240
+ `
241
+
242
+ const rmcHelp = `USAGE
243
+
244
+ gin remove-content [<filenames>]...
245
+ gin rmc [<filenames>]...
246
+
247
+ DESCRIPTION
248
+
249
+ Remove the content of local files. This command will not remove the content
250
+ of files that have not been already uploaded to a remote repository, even
251
+ if the user specifies such files exclusively. Removed content can be
252
+ retrieved from the server by using the 'gin download' command. With no
253
+ arguments, removes the content of all files under the current working
254
+ directory, as long as they have been safely uploaded to a remote
255
+ repository.
256
+
257
+ Note that after removal, placeholder files will remain in the local
258
+ repository. These files appear as 'No Content' when running the 'gin ls'
259
+ command.
260
+
261
+ ARGUMENTS
262
+
263
+ <filenames>
264
+ One or more names of files or directories to remove.
177
265
`
178
266
179
267
const reposHelp = `USAGE
@@ -257,16 +345,20 @@ EXAMPLES
257
345
`
258
346
259
347
var cmdHelp = map [string ]string {
260
- "login" : loginHelp ,
261
- "logout" : logoutHelp ,
262
- "create" : createHelp ,
263
- "get" : getHelp ,
264
- "ls" : lsHelp ,
265
- "upload" : uploadHelp ,
266
- "download" : downloadHelp ,
267
- "repos" : reposHelp ,
268
- "info" : infoHelp ,
269
- "keys" : keysHelp ,
348
+ "login" : loginHelp ,
349
+ "logout" : logoutHelp ,
350
+ "create" : createHelp ,
351
+ "get" : getHelp ,
352
+ "ls" : lsHelp ,
353
+ "unlock" : unlockHelp ,
354
+ "lock" : lockHelp ,
355
+ "upload" : uploadHelp ,
356
+ "download" : downloadHelp ,
357
+ "remove-content" : rmcHelp ,
358
+ "rmc" : rmcHelp ,
359
+ "repos" : reposHelp ,
360
+ "info" : infoHelp ,
361
+ "keys" : keysHelp ,
270
362
}
271
363
272
364
// ex: set cc=80:
0 commit comments