1
- # git fixup
1
+ # git instafix
2
2
3
3
Quickly fix up an old commit using your currently-staged changes.
4
4
5
5
![ usage] ( ./static/full-workflow-simple.gif )
6
6
7
7
## Usage
8
8
9
- After installation, just run ` git fixup ` or ` git squash ` to perform the related
10
- actions .
9
+ After installation, just run ` git instafix ` to commit your currently-staged
10
+ changes to an older commit in your branch .
11
11
12
- By default, ` git fixup ` checks for staged changes and offers to amend an old
12
+ By default, ` git instafix ` checks for staged changes and offers to amend an old
13
13
commit.
14
14
15
15
Given a repo that looks like:
16
16
17
17
![ linear-repo] ( ./static/00-initial-state.png )
18
18
19
- Running ` git fixup ` will allow you to edit an old commit:
19
+ Running ` git instafix ` will allow you to edit an old commit:
20
20
21
21
![ linear-repo-fixup] ( ./static/01-selector.gif )
22
22
@@ -28,44 +28,41 @@ If you're using a pull-request workflow (e.g. github) you will often have repos
28
28
29
29
![ full-repo] ( ./static/20-initial-full-repo.png )
30
30
31
- You can set ` GIT_INSTAFIX_UPSTREAM ` to a branch name and ` git fixup ` will only
31
+ You can set ` GIT_INSTAFIX_UPSTREAM ` to a branch name and ` git instafix ` will only
32
32
show changes between HEAD and the merge-base:
33
33
34
34
![ full-repo-fixup] ( ./static/21-with-upstream.gif )
35
35
36
36
In general this is just what you want, since you probably shouldn't be editing
37
37
commits that other people are working off of.
38
38
39
- After you select the commit to edit, ` git fixup ` will apply your staged changes
39
+ After you select the commit to edit, ` git instafix ` will apply your staged changes
40
40
to that commit without any further prompting or work from you.
41
41
42
- ` git-squash ` is just a symlink to ` git-fixup ` installed by brew, but if you
43
- invoke it (either as ` git-squash ` or ` git squash ` ) it will behave the same,
44
- asking you which change to amend, but after you have selected the commit to git
45
- will give you a chance to edit the commit message before changing the tree at
46
- that point.
42
+ Adding the ` --squash ` flag will behave the same, but after you have selected the commit amend to
43
+ git will give you a chance to edit the commit message before changing the tree at that point.
47
44
48
45
## Installation
49
46
50
47
If you're on macos or linux and using homebrew you should be able to do:
51
48
52
- brew install quodlibetor/git-fixup /git-fixup
53
-
49
+ brew install quodlibetor/git-tools /git-instafix
50
+
54
51
You can also install from this repo with ` cargo ` :
55
52
56
- cargo install --git https://github.com/quodlibetor/git-fixup
53
+ cargo install --git https://github.com/quodlibetor/git-instafix
57
54
58
55
Otherwise, you will need to compile with Rust. Install rust, clone this repo,
59
56
build, and then copy the binary into your bin dir:
60
57
61
58
curl https://sh.rustup.rs -sSf | sh
62
- git clone https://github.com/quodlibetor/git-fixup && cd git-fixup
59
+ git clone https://github.com/quodlibetor/git-instafix && cd git-instafix
63
60
cargo build --release
64
- cp target/release/git-fixup /usr/local/bin/git-fixup
61
+ cp target/release/git-instafix /usr/local/bin/git-instafix
65
62
66
63
## License
67
64
68
- git-fixup is licensed under either of
65
+ git-instafix is licensed under either of
69
66
70
67
* Apache License, Version 2.0, ([ LICENSE-APACHE] ( LICENSE-APACHE ) or
71
68
http://www.apache.org/licenses/LICENSE-2.0 )
0 commit comments