2
2
3
3
Quickly fix up an old commit using your currently-staged changes.
4
4
5
- [ ![ asciicast] ( ./static/asciicast.png )] ( https://asciinema.org/a/bLZ1eFaDTKKvVMtPzgTUgYNVG )
5
+ [ ![ asciicast] ( ./static/asciicast.png )] ( https://asciinema.org/a/SYKj4ztmMJ52cSmGxSF9hHjtl?autoplay=1&t=3 )
6
+
7
+ ## Usage
8
+
9
+ After installation, just run ` git fixup ` or ` git squash ` to perform the related
10
+ actions.
11
+
12
+ Running ` git fixup ` will check if you have any staged changes (if not it will
13
+ prompt you to stage all changes) and then present you with a list of commits
14
+ from your current work point (HEAD) to HEAD's upstream. For example, if you are
15
+ on ` master ` and its is ` origin/master ` , ` git fixup ` will show all commits
16
+ between ` master ` and ` origin/master ` . In general this is just what you want,
17
+ since you probably shouldn't be editing commits that other people are working
18
+ off of.
19
+
20
+ After you select the commit to edit, ` git fixup ` will apply your staged changes
21
+ to that commit without any further prompting or work from you.
22
+
23
+ ` git-squash ` is just a symlink to ` git-fixup ` installed by brew, but if you
24
+ invoke it (either as ` git-squash ` or ` git squash ` ) it will behave the same,
25
+ asking you which change to amend, but after you have selected the commit to git
26
+ will give you a chance to edit the commit message before changing the tree at
27
+ that point.
6
28
7
29
## Installation
8
30
@@ -18,10 +40,6 @@ build, and then copy the binary into your bin dir:
18
40
cargo build --release
19
41
cp target/release/git-fixup /usr/local/bin/git-fixup
20
42
21
- ## Usage
22
-
23
- After installation, just run ` git fixup ` or ` git squash ` to perform the related actions.
24
-
25
43
## License
26
44
27
45
git-fixup is licensed under either of
0 commit comments