Codebase list rust-libslirp / 9cbefaf
Merge commit '783e6fb00f03f4b29f3c6ab66321eb926c7c0274' as 'src/git-absorb/debian/doc' Andrej Shadura 3 years ago
4 changed file(s) with 349 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 build-manpage: git-absorb.1
1
2 git-absorb.1: git-absorb.txt
3 $(if $(shell which a2x),,$(error "No a2x in PATH; install asciidoc."))
4 $(info Building manpage. This may take a few moments...)
5 a2x -L -d manpage -f manpage git-absorb.txt
6
7 clean:
8 rm -f git-absorb.1 git-absorb.xml
0 git-absorb manual
1 =================
2
3 This project's man page `git-absorb.1.gz` can be generated from `git-absorb.txt`
4 by running `make`.
5
6 Build dependencies
7 ------------------
8
9 - [asciidoc][] (tested with version 8.6.10)
10 - GNU Make
11
12 [asciidoc]: http://www.methods.co.nz/asciidoc/
0 '\" t
1 .\" Title: git-absorb
2 .\" Author: [see the "AUTHOR" section]
3 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
4 .\" Date: 10/18/2019
5 .\" Manual: git absorb
6 .\" Source: git-absorb 0.5.0
7 .\" Language: English
8 .\"
9 .TH "GIT\-ABSORB" "1" "10/18/2019" "git\-absorb 0\&.5\&.0" "git absorb"
10 .\" -----------------------------------------------------------------
11 .\" * Define some portability stuff
12 .\" -----------------------------------------------------------------
13 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14 .\" http://bugs.debian.org/507673
15 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
16 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17 .ie \n(.g .ds Aq \(aq
18 .el .ds Aq '
19 .\" -----------------------------------------------------------------
20 .\" * set default formatting
21 .\" -----------------------------------------------------------------
22 .\" disable hyphenation
23 .nh
24 .\" disable justification (adjust text to left margin only)
25 .ad l
26 .\" -----------------------------------------------------------------
27 .\" * MAIN CONTENT STARTS HERE *
28 .\" -----------------------------------------------------------------
29 .SH "NAME"
30 git-absorb \- Automatically absorb staged changes into your current branch
31 .SH "SYNOPSIS"
32 .sp
33 .nf
34 \fIgit absorb\fR [FLAGS] [OPTIONS]
35 .fi
36 .SH "DESCRIPTION"
37 .sp
38 You have a feature branch with a few commits\&. Your teammate reviewed the branch and pointed out a few bugs\&. You have fixes for the bugs, but you don\(cqt want to shove them all into an opaque commit that says fixes, because you believe in atomic commits\&. Instead of manually finding commit SHAs for git commit \-\-fixup, or running a manual interactive rebase, do this:
39 .sp
40 .if n \{\
41 .RS 4
42 .\}
43 .nf
44 $ git add $FILES_YOU_FIXED
45
46 $ git absorb \-\-and\-rebase
47 (or)
48 $ git absorb
49 $ git rebase \-i \-\-autosquash master
50 .fi
51 .if n \{\
52 .RE
53 .\}
54 .sp
55 git absorb will automatically identify which commits are safe to modify, and which indexed changes belong to each of those commits\&. It will then write fixup! commits for each of those changes\&. You can check its output manually if you don\(cqt trust it, and then fold the fixups into your feature branch with git\(cqs built\-in autosquash functionality\&.
56 .SH "FLAGS"
57 .PP
58 \-r, \-\-and\-rebase
59 .RS 4
60 Run rebase if successful
61 .RE
62 .PP
63 \-n, \-\-dry\-run
64 .RS 4
65 Don\(cqt make any actual changes
66 .RE
67 .PP
68 \-f, \-\-force
69 .RS 4
70 Skip safety checks
71 .RE
72 .PP
73 \-h, \-\-help
74 .RS 4
75 Prints help information
76 .RE
77 .PP
78 \-V, \-\-version
79 .RS 4
80 Prints version information
81 .RE
82 .PP
83 \-v, \-\-verbose
84 .RS 4
85 Display more output
86 .RE
87 .SH "OPTIONS"
88 .PP
89 \-b <base>, \-\-base <base>
90 .RS 4
91 Use this commit as the base of the absorb stack
92 .RE
93 .SH "USAGE"
94 .sp
95 .RS 4
96 .ie n \{\
97 \h'-04' 1.\h'+01'\c
98 .\}
99 .el \{\
100 .sp -1
101 .IP " 1." 4.2
102 .\}
103 git add
104 any changes that you want to absorb\&. By design,
105 git absorb
106 will only consider content in the git index\&.
107 .RE
108 .sp
109 .RS 4
110 .ie n \{\
111 \h'-04' 2.\h'+01'\c
112 .\}
113 .el \{\
114 .sp -1
115 .IP " 2." 4.2
116 .\}
117 git absorb\&. This will create a sequence of commits on
118 HEAD\&. Each commit will have a
119 fixup!
120 message indicating the message (if unique) or SHA of the commit it should be squashed into\&.
121 .RE
122 .sp
123 .RS 4
124 .ie n \{\
125 \h'-04' 3.\h'+01'\c
126 .\}
127 .el \{\
128 .sp -1
129 .IP " 3." 4.2
130 .\}
131 If you are satisfied with the output,
132 git rebase \-i \-\-autosquash
133 to squash the
134 fixup!
135 commits into their predecessors\&. You can set the [GIT_SEQUENCE_EDITOR][] environment variable if you don\(cqt need to edit the rebase TODO file\&.
136 .RE
137 .sp
138 .RS 4
139 .ie n \{\
140 \h'-04' 4.\h'+01'\c
141 .\}
142 .el \{\
143 .sp -1
144 .IP " 4." 4.2
145 .\}
146 If you are not satisfied (or if something bad happened),
147 git reset \-\-soft
148 to the pre\-absorption commit to recover your old state\&. (You can find the commit in question with
149 git reflog\&.) And if you think
150 git absorb
151 is at fault, please [file an issue][]\&.
152 .RE
153 .sp
154 .if n \{\
155 .RS 4
156 .\}
157 .nf
158 [GIT_SEQUENCE_EDITOR]: https://stackoverflow\&.com/a/29094904
159 [file an issue]: https://github\&.com/tummychow/git\-absorb/issues/new
160 .fi
161 .if n \{\
162 .RE
163 .\}
164 .SH "CONFIGURATION"
165 .SS "STACK SIZE"
166 .sp
167 When run without \-\-base, git\-absorb will only search for candidate commits to fixup within a certain range (by default 10)\&. If you get an error like this:
168 .sp
169 .if n \{\
170 .RS 4
171 .\}
172 .nf
173 WARN stack limit reached, limit: 10
174 .fi
175 .if n \{\
176 .RE
177 .\}
178 .sp
179 edit your local or global \&.gitconfig and add the following section:
180 .sp
181 .if n \{\
182 .RS 4
183 .\}
184 .nf
185 [absorb]
186 maxStack=50 # Or any other reasonable value for your project
187 .fi
188 .if n \{\
189 .RE
190 .\}
191 .SH "GITHUB PROJECT"
192 .sp
193 https://github\&.com/tummychow/git\-absorb
194 .SH "AUTHOR"
195 .sp
196 Stephen Jung <tummychow511@gmail\&.com>
0 :man source: git-absorb
1 :man version: 0.5.0
2 :man manual: git absorb
3
4 git-absorb(1)
5 =============
6
7 NAME
8 ----
9 git-absorb - Automatically absorb staged changes into your current branch
10
11 SYNOPSIS
12 --------
13 [verse]
14 'git absorb' [FLAGS] [OPTIONS]
15
16 DESCRIPTION
17 -----------
18
19 You have a feature branch with a few commits. Your teammate reviewed the
20 branch and pointed out a few bugs. You have fixes for the bugs, but you
21 don't want to shove them all into an opaque commit that says `fixes`,
22 because you believe in atomic commits. Instead of manually finding commit
23 SHAs for `git commit --fixup`, or running a manual interactive rebase, do
24 this:
25
26 .............................................................................
27 $ git add $FILES_YOU_FIXED
28
29 $ git absorb --and-rebase
30 (or)
31 $ git absorb
32 $ git rebase -i --autosquash master
33 .............................................................................
34
35 `git absorb` will automatically identify which commits are safe to modify,
36 and which indexed changes belong to each of those commits. It will then
37 write `fixup!` commits for each of those changes. You can check its output
38 manually if you don't trust it, and then fold the fixups into your feature
39 branch with git's built-in autosquash functionality.
40
41 FLAGS
42 -----
43
44 -r::
45 --and-rebase::
46 Run rebase if successful
47
48 -n::
49 --dry-run::
50 Don't make any actual changes
51
52 -f::
53 --force::
54 Skip safety checks
55
56 -h::
57 --help::
58 Prints help information
59
60 -V::
61 --version::
62 Prints version information
63
64 -v::
65 --verbose::
66 Display more output
67
68 OPTIONS
69 -------
70
71 -b <base>::
72 --base <base>::
73 Use this commit as the base of the absorb stack
74
75 USAGE
76 -----
77
78 1. `git add` any changes that you want to absorb. By design, `git absorb`
79 will only consider content in the git index.
80
81 2. `git absorb`. This will create a sequence of commits on `HEAD`. Each
82 commit will have a `fixup!` message indicating the message (if unique) or
83 SHA of the commit it should be squashed into.
84
85 3. If you are satisfied with the output, `git rebase -i --autosquash` to
86 squash the `fixup!` commits into their predecessors. You can set the
87 [GIT_SEQUENCE_EDITOR][] environment variable if you don't need to edit
88 the rebase TODO file.
89
90 4. If you are not satisfied (or if something bad happened), `git reset
91 --soft` to the pre-absorption commit to recover your old state. (You can
92 find the commit in question with `git reflog`.) And if you think `git
93 absorb` is at fault, please [file an issue][].
94
95 .............................................................................
96 [GIT_SEQUENCE_EDITOR]: https://stackoverflow.com/a/29094904
97 [file an issue]: https://github.com/tummychow/git-absorb/issues/new
98 .............................................................................
99
100 CONFIGURATION
101 -------------
102
103 STACK SIZE
104 ~~~~~~~~~~
105
106 When run without `--base`, git-absorb will only search for candidate
107 commits to fixup within a certain range (by default 10). If you get an
108 error like this:
109
110 .............................................................................
111 WARN stack limit reached, limit: 10
112 .............................................................................
113
114 edit your local or global `.gitconfig` and add the following section:
115
116 .............................................................................
117 [absorb]
118 maxStack=50 # Or any other reasonable value for your project
119 .............................................................................
120
121 GITHUB PROJECT
122 --------------
123
124 https://github.com/tummychow/git-absorb
125
126 AUTHOR
127 ------
128
129 Stephen Jung <tummychow511@gmail.com>