git-difme

git do it for me - ricketyspace.net/git-difme
git clone git://git.ricketyspace.net/git-difme.git
Log | Files | Refs | README | LICENSE

README (2189B)


      1 # git-difme
      2 
      3 \[[repo][]\] \[[releases][]\]
      4 
      5 [repo]: https://git.ricketyspace.net/git-difme
      6 [releases]: https://ricketyspace.net/git-difme/releases
      7 
      8 ```
      9 git clone git://git.ricketyspace.net/git-difme.git
     10 ```
     11 
     12 Stages files and makes commits on a list of git repositories based on
     13 some rules.
     14 
     15 It always does a `git push` on each repo that it visits.
     16 
     17 ## rules
     18 
     19 The rules specify what type of files to stage and commit.
     20 
     21 A rule can either be a regex that matches a file or a file mod type.
     22 
     23 The following file mod types are recognized:
     24 
     25 - `M`: modified file.
     26 - `D`: deleted file.
     27 - `?`: untracked file.
     28 - `.`: all files.
     29 
     30 The rules are defined per git repository in the config file.
     31 
     32 If git-difme finds already staged files, it'll commit them first
     33 before doing anything.
     34 
     35 ## config
     36 
     37 The config file must be at `~/.config/git-difme/config`.
     38 
     39 The config is simply a scheme file that defines the `difme-repos`
     40 function:
     41 
     42     (define (difme-repos)
     43       (list '("/path/to/git/repo/foo" "M" "D" "?")
     44             '("/path/to/git/repo/bar" "M")
     45             '("/path/to/git/repo/baz" ".")
     46             '("/path/to/git/repo/frb" "\\.txt" "personal/log.org" "?")
     47             '("/path/to/git/repo/dot" ".config/")))
     48 
     49 - For repo `foo`, git-difme will stage and commit modified (M),
     50   deleted (D) and untracked (?) files.
     51 - For repo `bar`, git-difme will only stage and commit modified (M)
     52   files.
     53 - For repo `baz`, git-difme will stage and commit all files (.).
     54 - For repo `frb`, git-difme will stage and commit all files that have
     55   '`.txt`' extension, file(s) whose path matches '`personal/log.org`',
     56   and all untracked files (?).
     57 - For repo `dot`, git-difme will stage and commit all files under the
     58   '`.config`' directory.
     59 
     60 ## installing
     61 
     62 ### the script
     63 
     64 `git-difme` is written [guile][]. First [install guile][i], then do:
     65 
     66     # make git-difme
     67 
     68 That will install the `git-difme` script git-difme at
     69 `/usr/local/bin`.
     70 
     71 [guile]: https://gnu.org/s/guile
     72 [i]: https://ricketyspace.net/git-difme/install-guile
     73 
     74 ### the config file
     75 
     76     $ make config
     77 
     78 That will install a sample config file at `~/.config/git-difme`.
     79 
     80 ## running
     81 
     82     $ git-difme
     83 
     84 will do it.
     85 
     86 ## license
     87 
     88 GNU GPL version 3 or higher.