-
Notifications
You must be signed in to change notification settings - Fork 1
/
sgit
executable file
·6360 lines (5043 loc) · 136 KB
/
sgit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/usr/bin/env bash
# This script was generated by bashly 1.1.3 (https://bashly.dannyb.co)
# Modifying it manually is not recommended
# :wrapper.bash3_bouncer
if [[ "${BASH_VERSINFO:-0}" -lt 4 ]]; then
printf "bash version 4 or higher is required\n" >&2
exit 1
fi
# :command.master_script
# :command.version_command
version_command() {
echo "$version"
}
# :command.usage
sgit_usage() {
if [[ -n $long_usage ]]; then
printf "sgit - Syntactic sugar for Git, respecting semantics and modern conventions\n"
echo
else
printf "sgit - Syntactic sugar for Git, respecting semantics and modern conventions\n"
echo
fi
printf "%s\n" "Usage:"
printf " sgit COMMAND\n"
printf " sgit [COMMAND] --help | -h\n"
printf " sgit --version | -v\n"
echo
# :command.usage_commands
printf "%s\n" "Branches Commands:"
printf " %s List all branches, only remote or only local\n" "ls "
printf " %s Create new branch\n" "take "
printf " %s Change the current working branch\n" "cd "
printf " %s Rename some branch\n" "mv "
printf " %s Delete some branch\n" "rm "
echo
printf "%s\n" "State Commands:"
printf " %s Save credentials storage in git repository\n" "save "
printf " %s Show the current remote repository\n" "remote "
printf " %s Wipe the working branch as per the remote branch\n" "wipe "
printf " %s Back the commit history, but it preserves the file contents\n" "rollback "
printf " %s Edit some commit message\n" "edit "
printf " %s Fetch and merge changes from remote branch to working branch (pull shortcut)\n" "get "
printf " %s Send committed changes from working branch to the respective remote branch (push shortcut)\n" "put "
echo
printf "%s\n" "Consult Commands:"
printf " %s Search in the history commit by applying some filters\n" "log "
printf " %s Show the current state of git working directory and staging area\n" "status "
printf " %s Show the incoming commits from remote branch that is not in the working branch\n" "incoming "
printf " %s Show the outgoing commits from working branch that is not in the remote branch\n" "outgoing "
printf " %s Show the committers of the current branch\n" "committers "
echo
printf "%s\n" "Staging Commands:"
printf " %s Add files or directories to staging area\n" "add "
printf " %s Remove files or directories from staging area\n" "sub "
printf " %s Add all untracked, modified and deleted files to the last commit without edit the message\n" "amend "
printf " %s Resolve conflicts in the working branch\n" "resolve "
printf " %s Add an annotated tag with the description same as the message\n" "tag "
echo
printf "%s\n" "Commit Commands:"
printf " %s Use AI to generate a commit message according the description in any language\n" "commit "
printf " %s Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)\n" "build "
printf " %s Code change that external user won't see (eg: change to .gitignore file or .prettierrc file)\n" "chore "
printf " %s Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)\n" "ci "
printf " %s Documentation only changes\n" "docs "
printf " %s New feature\n" "feat "
printf " %s Bug fix\n" "fix "
printf " %s Translations update\n" "localize "
printf " %s Code change that improves performance\n" "perf "
printf " %s Code change that neither fixes a bug nor adds a feature; refactoring production code, eg. renaming a variable\n" "refactor "
printf " %s Reverts a previous commit\n" "revert "
printf " %s Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)\n" "style "
printf " %s Adding missing tests or correcting existing tests\n" "test "
echo
printf "%s\n" "Completions Commands:"
printf " %s Generate bash completions\n" "completions"
echo
# :command.long_usage
if [[ -n $long_usage ]]; then
printf "%s\n" "Options:"
# :command.usage_fixed_flags
printf " %s\n" "--help, -h"
printf " Show this help\n"
echo
printf " %s\n" "--version, -v"
printf " Show version number\n"
echo
fi
}
# :command.usage
sgit_ls_usage() {
if [[ -n $long_usage ]]; then
printf "sgit ls - List all branches, only remote or only local\n"
echo
else
printf "sgit ls - List all branches, only remote or only local\n"
echo
fi
printf "%s\n" "Usage:"
printf " sgit ls [OPTIONS]\n"
printf " sgit ls --help | -h\n"
echo
# :command.long_usage
if [[ -n $long_usage ]]; then
printf "%s\n" "Options:"
# :command.usage_flags
# :flag.usage
printf " %s\n" "--remote, -r"
printf " List only remote branches\n"
echo
# :flag.usage
printf " %s\n" "--local, -l"
printf " List only local branches\n"
echo
# :command.usage_fixed_flags
printf " %s\n" "--help, -h"
printf " Show this help\n"
echo
fi
}
# :command.usage
sgit_take_usage() {
if [[ -n $long_usage ]]; then
printf "sgit take - Create new branch\n"
echo
else
printf "sgit take - Create new branch\n"
echo
fi
printf "Alias: mkdir\n"
echo
printf "%s\n" "Usage:"
printf " sgit take [DESCRIPTION] [OPTIONS]\n"
printf " sgit take --help | -h\n"
echo
# :command.long_usage
if [[ -n $long_usage ]]; then
printf "%s\n" "Options:"
# :command.usage_flags
# :flag.usage
printf " %s\n" "--origin, -o"
printf " Defines if the branch should also be created in the origin\n"
echo
# :flag.usage
printf " %s\n" "--only-origin, -O"
printf " Defines if the branch should be only created in the origin\n"
echo
# :flag.usage
printf " %s\n" "--main"
printf " The production branch\n"
echo
# :flag.usage
printf " %s\n" "--staging, -s"
printf " Demo branch and decisions about release features\n"
echo
# :flag.usage
printf " %s\n" "--test, -t"
printf " Contains all codes ready for QA testing\n"
echo
# :flag.usage
printf " %s\n" "--dev, -d"
printf " All new features and bug fixes; codes conflicts should be done here\n"
echo
# :flag.usage
printf " %s\n" "--feature, -f DESCRIPTION"
printf " Any code changes for a new module or use case; should be created based on\n the current development branch\n"
echo
# :flag.usage
printf " %s\n" "--bugfix, -b DESCRIPTION"
printf " If the code changes made from the feature branch were rejected after a\n release, sprint or demo\n"
echo
# :flag.usage
printf " %s\n" "--hotfix, -H DESCRIPTION"
printf " If there is a need to fix something that should be handled immediately;\n could be merged directly to the production branch\n"
echo
# :flag.usage
printf " %s\n" "--experimental, -e DESCRIPTION"
printf " Any new feature or idea that is not part of a release or a sprint; a branch\n for playing around\n"
echo
# :flag.usage
printf " %s\n" "--build, -u DESCRIPTION"
printf " A branch specifically for creating specific build artifacts or for doing\n code coverage runs\n"
echo
# :flag.usage
printf " %s\n" "--release, -r DESCRIPTION"
printf " A branch for tagging a specific release version\n"
echo
# :flag.usage
printf " %s\n" "--merge, -m DESCRIPTION"
printf " Resolving merge conflicts, usually between the latest development and a\n feature or hotfix branch; also to merge two branches of one feature\n"
echo
# :command.usage_fixed_flags
printf " %s\n" "--help, -h"
printf " Show this help\n"
echo
# :command.usage_args
printf "%s\n" "Arguments:"
# :argument.usage
printf " %s\n" "DESCRIPTION"
printf " The description is a brief explanation about the branch purpose\n"
echo
# :command.usage_examples
printf "%s\n" "Examples:"
printf " [Command]\n"
printf " - sgit take -f \"my really awesome feature\" -o\n"
printf " [Result]\n"
printf " - git checkout -b \"feature/my-really-awesome-feature\"\n"
printf " - git push origin \"feature/my-really-awesome-feature\"\n"
echo
fi
}
# :command.usage
sgit_cd_usage() {
if [[ -n $long_usage ]]; then
printf "sgit cd - Change the current working branch\n"
echo
else
printf "sgit cd - Change the current working branch\n"
echo
fi
printf "%s\n" "Usage:"
printf " sgit cd BRANCH\n"
printf " sgit cd --help | -h\n"
echo
# :command.long_usage
if [[ -n $long_usage ]]; then
printf "%s\n" "Options:"
# :command.usage_fixed_flags
printf " %s\n" "--help, -h"
printf " Show this help\n"
echo
# :command.usage_args
printf "%s\n" "Arguments:"
# :argument.usage
printf " %s\n" "BRANCH"
printf " The branch to go to\n"
echo
# :command.usage_examples
printf "%s\n" "Examples:"
printf " [Command]\n"
printf " - sgit cd main\n"
printf " [Result]\n"
printf " - git checkout \"main\"\n"
echo
fi
}
# :command.usage
sgit_mv_usage() {
if [[ -n $long_usage ]]; then
printf "sgit mv - Rename some branch\n"
echo
else
printf "sgit mv - Rename some branch\n"
echo
fi
printf "%s\n" "Usage:"
printf " sgit mv OLD_BRANCH NEW_BRANCH [OPTIONS]\n"
printf " sgit mv --help | -h\n"
echo
# :command.long_usage
if [[ -n $long_usage ]]; then
printf "%s\n" "Options:"
# :command.usage_flags
# :flag.usage
printf " %s\n" "--origin, -o"
printf " Defines if the branch should also be renamed in the origin\n"
echo
# :flag.usage
printf " %s\n" "--only-origin, -O"
printf " Defines if the branch should be only renamed in the origin\n"
echo
# :command.usage_fixed_flags
printf " %s\n" "--help, -h"
printf " Show this help\n"
echo
# :command.usage_args
printf "%s\n" "Arguments:"
# :argument.usage
printf " %s\n" "OLD_BRANCH"
printf " The current branch you want to rename\n"
echo
# :argument.usage
printf " %s\n" "NEW_BRANCH"
printf " The new name for branch\n"
echo
fi
}
# :command.usage
sgit_rm_usage() {
if [[ -n $long_usage ]]; then
printf "sgit rm - Delete some branch\n"
echo
else
printf "sgit rm - Delete some branch\n"
echo
fi
printf "%s\n" "Usage:"
printf " sgit rm [BRANCH] [OPTIONS]\n"
printf " sgit rm --help | -h\n"
echo
# :command.long_usage
if [[ -n $long_usage ]]; then
printf "%s\n" "Options:"
# :command.usage_flags
# :flag.usage
printf " %s\n" "--origin, -o"
printf " Defines if the branch should also be deleted in the origin\n"
echo
# :flag.usage
printf " %s\n" "--only-origin, -O"
printf " Defines if the branch should be only deleted in the origin\n"
echo
# :command.usage_fixed_flags
printf " %s\n" "--help, -h"
printf " Show this help\n"
echo
# :command.usage_args
printf "%s\n" "Arguments:"
# :argument.usage
printf " %s\n" "BRANCH"
printf " Branch to delete; if none are informed, delete the current one\n"
echo
fi
}
# :command.usage
sgit_save_usage() {
if [[ -n $long_usage ]]; then
printf "sgit save - Save credentials storage in git repository\n"
echo
else
printf "sgit save - Save credentials storage in git repository\n"
echo
fi
printf "%s\n" "Usage:"
printf " sgit save [OPTIONS]\n"
printf " sgit save --help | -h\n"
echo
# :command.long_usage
if [[ -n $long_usage ]]; then
printf "%s\n" "Options:"
# :command.usage_flags
# :flag.usage
printf " %s\n" "--global, -g"
printf " Enable credentials storage globally\n"
echo
# :command.usage_fixed_flags
printf " %s\n" "--help, -h"
printf " Show this help\n"
echo
fi
}
# :command.usage
sgit_remote_usage() {
if [[ -n $long_usage ]]; then
printf "sgit remote - Show the current remote repository\n"
echo
else
printf "sgit remote - Show the current remote repository\n"
echo
fi
printf "%s\n" "Usage:"
printf " sgit remote [OPTIONS]\n"
printf " sgit remote --help | -h\n"
echo
# :command.long_usage
if [[ -n $long_usage ]]; then
printf "%s\n" "Options:"
# :command.usage_flags
# :flag.usage
printf " %s\n" "--add, -a ADD"
printf " Add or replace the current origin remote repository\n"
echo
# :flag.usage
printf " %s\n" "--remove, -r"
printf " Remove the current origin remote repository\n"
echo
# :command.usage_fixed_flags
printf " %s\n" "--help, -h"
printf " Show this help\n"
echo
fi
}
# :command.usage
sgit_wipe_usage() {
if [[ -n $long_usage ]]; then
printf "sgit wipe - Wipe the working branch as per the remote branch\n"
echo
else
printf "sgit wipe - Wipe the working branch as per the remote branch\n"
echo
fi
printf "%s\n" "Usage:"
printf " sgit wipe [BRANCH] [OPTIONS]\n"
printf " sgit wipe --help | -h\n"
echo
# :command.long_usage
if [[ -n $long_usage ]]; then
printf "%s\n" "Options:"
# :command.usage_flags
# :flag.usage
printf " %s\n" "--yes, -y"
printf " Skip confirmation\n"
echo
# :command.usage_fixed_flags
printf " %s\n" "--help, -h"
printf " Show this help\n"
echo
# :command.usage_args
printf "%s\n" "Arguments:"
# :argument.usage
printf " %s\n" "BRANCH"
printf " Branch to wipe; if none are informed, wipe the current one\n"
echo
fi
}
# :command.usage
sgit_rollback_usage() {
if [[ -n $long_usage ]]; then
printf "sgit rollback - Back the commit history, but it preserves the file contents\n"
echo
else
printf "sgit rollback - Back the commit history, but it preserves the file contents\n"
echo
fi
printf "Alias: rb\n"
echo
printf "%s\n" "Usage:"
printf " sgit rollback [COMMIT_ID]\n"
printf " sgit rollback --help | -h\n"
echo
# :command.long_usage
if [[ -n $long_usage ]]; then
printf "%s\n" "Options:"
# :command.usage_fixed_flags
printf " %s\n" "--help, -h"
printf " Show this help\n"
echo
# :command.usage_args
printf "%s\n" "Arguments:"
# :argument.usage
printf " %s\n" "COMMIT_ID"
printf " The commit ID; if none are informed, rollback to the last commit\n"
echo
fi
}
# :command.usage
sgit_edit_usage() {
if [[ -n $long_usage ]]; then
printf "sgit edit - Edit some commit message\n"
echo
else
printf "sgit edit - Edit some commit message\n"
echo
fi
printf "%s\n" "Usage:"
printf " sgit edit [COMMIT_ID]\n"
printf " sgit edit --help | -h\n"
echo
# :command.long_usage
if [[ -n $long_usage ]]; then
printf "%s\n" "Options:"
# :command.usage_fixed_flags
printf " %s\n" "--help, -h"
printf " Show this help\n"
echo
# :command.usage_args
printf "%s\n" "Arguments:"
# :argument.usage
printf " %s\n" "COMMIT_ID"
printf " The commit ID; if none are informed, edit the last commit\n"
echo
fi
}
# :command.usage
sgit_get_usage() {
if [[ -n $long_usage ]]; then
printf "sgit get - Fetch and merge changes from remote branch to working branch (pull shortcut)\n"
echo
else
printf "sgit get - Fetch and merge changes from remote branch to working branch (pull shortcut)\n"
echo
fi
printf "%s\n" "Usage:"
printf " sgit get [BRANCH] [OPTIONS]\n"
printf " sgit get --help | -h\n"
echo
# :command.long_usage
if [[ -n $long_usage ]]; then
printf "%s\n" "Options:"
# :command.usage_flags
# :flag.usage
printf " %s\n" "--force, -f"
printf " Overwrite existing local commits in case conflicts\n"
echo
# :command.usage_fixed_flags
printf " %s\n" "--help, -h"
printf " Show this help\n"
echo
# :command.usage_args
printf "%s\n" "Arguments:"
# :argument.usage
printf " %s\n" "BRANCH"
printf " Branch name to get\n"
echo
fi
}
# :command.usage
sgit_put_usage() {
if [[ -n $long_usage ]]; then
printf "sgit put - Send committed changes from working branch to the respective remote branch (push shortcut)\n"
echo
else
printf "sgit put - Send committed changes from working branch to the respective remote branch (push shortcut)\n"
echo
fi
printf "%s\n" "Usage:"
printf " sgit put [BRANCH] [OPTIONS]\n"
printf " sgit put --help | -h\n"
echo
# :command.long_usage
if [[ -n $long_usage ]]; then
printf "%s\n" "Options:"
# :command.usage_flags
# :flag.usage
printf " %s\n" "--force, -f"
printf " Overwrite existing origin commits in case conflicts\n"
echo
# :command.usage_fixed_flags
printf " %s\n" "--help, -h"
printf " Show this help\n"
echo
# :command.usage_args
printf "%s\n" "Arguments:"
# :argument.usage
printf " %s\n" "BRANCH"
printf " Branch name to put\n"
echo
fi
}
# :command.usage
sgit_log_usage() {
if [[ -n $long_usage ]]; then
printf "sgit log - Search in the history commit by applying some filters\n"
echo
else
printf "sgit log - Search in the history commit by applying some filters\n"
echo
fi
printf "Alias: l\n"
echo
printf "%s\n" "Usage:"
printf " sgit log [SEARCH_TERMS] [OPTIONS]\n"
printf " sgit log --help | -h\n"
echo
# :command.long_usage
if [[ -n $long_usage ]]; then
printf "%s\n" "Options:"
# :command.usage_flags
# :flag.usage
printf " %s\n" "--author, -a AUTHOR"
printf " Filter by author\n"
echo
# :flag.usage
printf " %s\n" "--since, -s SINCE"
printf " Filter since of...\n"
echo
# :flag.usage
printf " %s\n" "--until, -u UNTIL"
printf " Filter until of...\n"
echo
# :flag.usage
printf " %s\n" "--exclude, -e"
printf " Filter excluding some term\n"
echo
# :command.usage_fixed_flags
printf " %s\n" "--help, -h"
printf " Show this help\n"
echo
# :command.usage_args
printf "%s\n" "Arguments:"
# :argument.usage
printf " %s\n" "SEARCH_TERMS"
printf " Type something to search, like \"feat\" to see all feature commits\n"
echo
fi
}
# :command.usage
sgit_status_usage() {
if [[ -n $long_usage ]]; then
printf "sgit status - Show the current state of git working directory and staging area\n"
echo
else
printf "sgit status - Show the current state of git working directory and staging area\n"
echo
fi
printf "Alias: s\n"
echo
printf "%s\n" "Usage:"
printf " sgit status\n"
printf " sgit status --help | -h\n"
echo
# :command.long_usage
if [[ -n $long_usage ]]; then
printf "%s\n" "Options:"
# :command.usage_fixed_flags
printf " %s\n" "--help, -h"
printf " Show this help\n"
echo
fi
}
# :command.usage
sgit_incoming_usage() {
if [[ -n $long_usage ]]; then
printf "sgit incoming - Show the incoming commits from remote branch that is not in the working branch\n"
echo
else
printf "sgit incoming - Show the incoming commits from remote branch that is not in the working branch\n"
echo
fi
printf "Alias: in\n"
echo
printf "%s\n" "Usage:"
printf " sgit incoming\n"
printf " sgit incoming --help | -h\n"
echo
# :command.long_usage
if [[ -n $long_usage ]]; then
printf "%s\n" "Options:"
# :command.usage_fixed_flags
printf " %s\n" "--help, -h"
printf " Show this help\n"
echo
fi
}
# :command.usage
sgit_outgoing_usage() {
if [[ -n $long_usage ]]; then
printf "sgit outgoing - Show the outgoing commits from working branch that is not in the remote branch\n"
echo
else
printf "sgit outgoing - Show the outgoing commits from working branch that is not in the remote branch\n"
echo
fi
printf "Alias: out\n"
echo
printf "%s\n" "Usage:"
printf " sgit outgoing\n"
printf " sgit outgoing --help | -h\n"
echo
# :command.long_usage
if [[ -n $long_usage ]]; then
printf "%s\n" "Options:"
# :command.usage_fixed_flags
printf " %s\n" "--help, -h"
printf " Show this help\n"
echo
fi
}
# :command.usage
sgit_committers_usage() {
if [[ -n $long_usage ]]; then
printf "sgit committers - Show the committers of the current branch\n"
echo
else
printf "sgit committers - Show the committers of the current branch\n"
echo
fi
printf "Alias: cm\n"
echo
printf "%s\n" "Usage:"
printf " sgit committers\n"
printf " sgit committers --help | -h\n"
echo
# :command.long_usage
if [[ -n $long_usage ]]; then
printf "%s\n" "Options:"
# :command.usage_fixed_flags
printf " %s\n" "--help, -h"
printf " Show this help\n"
echo
fi
}
# :command.usage
sgit_add_usage() {
if [[ -n $long_usage ]]; then
printf "sgit add - Add files or directories to staging area\n"
echo
else
printf "sgit add - Add files or directories to staging area\n"
echo
fi
printf "%s\n" "Usage:"
printf " sgit add [STRING...]\n"
printf " sgit add --help | -h\n"
echo
# :command.long_usage
if [[ -n $long_usage ]]; then
printf "%s\n" "Options:"
# :command.usage_fixed_flags
printf " %s\n" "--help, -h"
printf " Show this help\n"
echo
fi
}
# :command.usage
sgit_sub_usage() {
if [[ -n $long_usage ]]; then
printf "sgit sub - Remove files or directories from staging area\n"
echo
else
printf "sgit sub - Remove files or directories from staging area\n"
echo
fi
printf "%s\n" "Usage:"
printf " sgit sub [OPTIONS] [STRING...]\n"
printf " sgit sub --help | -h\n"
echo
# :command.long_usage
if [[ -n $long_usage ]]; then
printf "%s\n" "Options:"
# :command.usage_flags
# :flag.usage
printf " %s\n" "--all, -a"
printf " Remove all files or directories from staging area\n"
echo
# :command.usage_fixed_flags
printf " %s\n" "--help, -h"
printf " Show this help\n"
echo
fi
}
# :command.usage
sgit_amend_usage() {
if [[ -n $long_usage ]]; then
printf "sgit amend - Add all untracked, modified and deleted files to the last commit without edit the message\n"
echo
else
printf "sgit amend - Add all untracked, modified and deleted files to the last commit without edit the message\n"
echo
fi
printf "%s\n" "Usage:"
printf " sgit amend [OPTIONS]\n"
printf " sgit amend --help | -h\n"
echo
# :command.long_usage
if [[ -n $long_usage ]]; then
printf "%s\n" "Options:"
# :command.usage_flags
# :flag.usage
printf " %s\n" "--add, -a ADD"
printf " Add specific untracked, modified and deleted file to this commit\n"
echo
# :flag.usage
printf " %s\n" "--add-all, -A"
printf " Add all untracked, modified and deleted files to this commit\n"
echo
# :flag.usage
printf " %s\n" "--put, -p"
printf " Put this commit directly on the remote branch\n"
echo
# :flag.usage
printf " %s\n" "--force, -f"
printf " If pushed, overwrite existing commits in case conflicts\n"
echo
# :command.usage_fixed_flags
printf " %s\n" "--help, -h"
printf " Show this help\n"
echo
fi
}
# :command.usage
sgit_resolve_usage() {
if [[ -n $long_usage ]]; then
printf "sgit resolve - Resolve conflicts in the working branch\n"
echo
else
printf "sgit resolve - Resolve conflicts in the working branch\n"
echo
fi
printf "%s\n" "Usage:"
printf " sgit resolve [OPTIONS]\n"
printf " sgit resolve --help | -h\n"
echo