File: git-magic.md

package info (click to toggle)
git-extras 7.4.0-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 2,120 kB
  • sloc: sh: 4,312; python: 994; makefile: 146
file content (85 lines) | stat: -rw-r--r-- 1,839 bytes parent folder | download | duplicates (2)
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
git-magic(1) -- Automate add/commit/push routines
================================

## SYNOPSIS

`git-magic` [-a] [-m <msg>] [-e] [-p] [-f]

## DESCRIPTION

Produces summary of changes for commit message from `git status --porcelain` output.
Commits staged changes with the generated commit message and
opens editor to modify generated commit message optionally.
Also staging and pushing can be automated optionally.

## OPTIONS

-a

Adds everything including untracked files.

-m <msg>

Use the given <msg> as the commit message. If multiple -m options are given, their values are concatenated as separate paragraphs.
Passed to git commit command. The generated is appended to user-given messages.

-e

This option lets you further edit the generated message.
Passed to git commit command.

-p

Runs `git push` after commit.

-f

Adds `-f` option to `git push` command.

-h

Prints synopsis.

## EXAMPLES

This example stages all changes then commits with automatic commit message.

```
$ git magic -a
[feature/magic dc2a11e] A  man/git-magic.md
 1 file changed, 37 insertions(+)
 create mode 100644 man/git-auto.md
# git log
Author: overengineer <54alpersaid@gmail.com>
Date:   Thu Sep 30 20:14:22 2021 +0300

    M  man/git-magic.md
```

`-m` option PREPENDS generated message.

```
$ git magic -am "Added documentation for git magic"
[feature/magic dc2a11e] Added documentation for git magic
 1 file changed, 42 insertions(+), 0 deletions(-)
 create mode 100644 A man/git-auto.md
$ git log
Author: overengineer <54alpersaid@gmail.com>
Date:   Thu Sep 30 20:14:22 2021 +0300

    Added documentation for git magic
    
    M  man/git-magic.md
```

## AUTHOR

Written by Alper S. Soylu <54alpersaid@gmail.com>

## REPORTING BUGS

&lt;<https://github.com/tj/git-extras/issues>&gt;

## SEE ALSO

&lt;<https://github.com/tj/git-extras>&gt;