README.md
1	# simply-git
2
3 Project to abstract some of the weirder git operations or things that I forget. Should always be able to be used alongside git, as opposed to trying to replace it outright.
4 Mainly writing to learn more about Git and Perl, unlikely to be widely useful.
5
6 ```
7 simply-git
8 Usage:
9 --view
10 Display git status of files and other information
11
12 --dump-config
13 Dump .git/config to STDOUT. Not really useful but exposed for testing of reading config into internal data structure
14
15 --push-all [--commit-msg]
16 Push all untracked and modified files
17 * Can be used with interactive mode
18 * Can provide a commit msg with --commit-msg (otherwise a generic will be provided)
19
20 --interactive
21 Enable interactive mode with supported opts
22
23 --reset-from-master
24 Reset all current changes so that the file tree matches origin master
25
26 --reset-from-upstream [ --upstream-url ]
27 If upstream is defined will reset local branch to match upstream ( does not push changes to origin )
28 * Assumes you have an upstream configured
29 * Pass SSH/HTTPS URL to --upstream-url to add an upstream
30
31 --configure-local-user [--user,--email]
32 Configure local git user
33 * Can be used with interactive mode
34
35 --config-file
36 Default is ~/.sg/sg.config, can use this opt to use another file
37 * See example.config
38
39 --knock
40 Will try and knock the defined git server at the defined ports before any operation
41 * See example.config
42 * Can pass this by itself to perform a knock and exit
43
44 --knock-clone
45 Will try and knock the defined git server and clone the provided repo
46 * Will not check if you're in a git dir
47
48 --knock-pull
49 Will try and knock the defined git server and git pull
50 ```
51
52 ## Deps
53 * perl, Log4Perl, which, git, nmap
54 * Shellex.pm perl module: https://spwbk.site/git/projects/perl-shellex.git/index.html
55
56 ## Installation
57 Can use provided install.sh to install
58
59 ## TODO - Features:
60 * Warn about upstream updates
61
62 ## TODO - Stuff to fix:
63 * Problems with `--push-all` when running from a relative path in the git dir (as opposed to the root)
64 * multipule TODO:'s in various files
65 * Code is getting messy, see TODOs
66 * Added basic color support, should really be moved somewhere else so the Git.pm module can make proper use of it
67 * Won't recognize as a git dir unless in the top level of the repo