1GIT-ABSORB(1)                     git absorb                     GIT-ABSORB(1)
2
3
4

NAME

6       git-absorb - Automatically absorb staged changes into your current
7       branch
8

SYNOPSIS

10       git absorb [FLAGS] [OPTIONS]
11

DESCRIPTION

13       You have a feature branch with a few commits. Your teammate reviewed
14       the branch and pointed out a few bugs. You have fixes for the bugs, but
15       you don’t want to shove them all into an opaque commit that says fixes,
16       because you believe in atomic commits. Instead of manually finding
17       commit SHAs for git commit --fixup, or running a manual interactive
18       rebase, do this:
19
20           $ git add $FILES_YOU_FIXED
21
22           $ git absorb --and-rebase
23             (or)
24           $ git absorb
25           $ git rebase -i --autosquash master
26
27       git absorb will automatically identify which commits are safe to
28       modify, and which indexed changes belong to each of those commits. It
29       will then write fixup! commits for each of those changes. You can check
30       its output manually if you don’t trust it, and then fold the fixups
31       into your feature branch with git’s built-in autosquash functionality.
32

FLAGS

34       -r, --and-rebase
35           Run rebase if successful
36
37       -n, --dry-run
38           Don’t make any actual changes
39
40       -f, --force
41           Skip safety checks
42
43       -h, --help
44           Prints help information
45
46       -V, --version
47           Prints version information
48
49       -v, --verbose
50           Display more output
51

OPTIONS

53       -b <base>, --base <base>
54           Use this commit as the base of the absorb stack
55

USAGE

57        1. git add any changes that you want to absorb. By design, git absorb
58           will only consider content in the git index.
59
60        2. git absorb. This will create a sequence of commits on HEAD. Each
61           commit will have a fixup!  message indicating the message (if
62           unique) or SHA of the commit it should be squashed into.
63
64        3. If you are satisfied with the output, git rebase -i --autosquash to
65           squash the fixup!  commits into their predecessors. You can set the
66           [GIT_SEQUENCE_EDITOR][] environment variable if you don’t need to
67           edit the rebase TODO file.
68
69        4. If you are not satisfied (or if something bad happened), git reset
70           --soft to the pre-absorption commit to recover your old state. (You
71           can find the commit in question with git reflog.) And if you think
72           git absorb is at fault, please [file an issue][].
73
74           [GIT_SEQUENCE_EDITOR]: https://stackoverflow.com/a/29094904
75           [file an issue]: https://github.com/tummychow/git-absorb/issues/new
76

CONFIGURATION

78   STACK SIZE
79       When run without --base, git-absorb will only search for candidate
80       commits to fixup within a certain range (by default 10). If you get an
81       error like this:
82
83           WARN stack limit reached, limit: 10
84
85       edit your local or global .gitconfig and add the following section:
86
87           [absorb]
88               maxStack=50 # Or any other reasonable value for your project
89

GITHUB PROJECT

91       https://github.com/tummychow/git-absorb
92

AUTHOR

94       Stephen Jung <tummychow511@gmail.com>
95
96
97
98git-absorb 0.5.0                  10/18/2019                     GIT-ABSORB(1)
Impressum