You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To combine multiple commits into one (recommended unless your PR covers multiple topics):
9
+
10
+
```bash
11
+
# Adjust the number based on how many commits you want to squash
12
+
git rebase -i HEAD~3
13
+
```
14
+
15
+
In the interactive editor that appears:
16
+
1. Keep the first commit as `pick`
17
+
2. Change subsequent commits from `pick` to `fixup` (short form`f`). You may also choose `squash` (`s`), however, `fixup` is recommended to keep the commit message clean.
18
+
3. Save and close the editor to proceed
19
+
20
+
Example:
21
+
```
22
+
pick aaaaaaa First commit message
23
+
pick bbbbbbb Second commit message
24
+
pick ccccccc Fix typo
25
+
```
26
+
27
+
To:
28
+
```
29
+
pick aaaaaaa First commit message
30
+
f bbbbbbb Second commit message
31
+
f ccccccc Fix typo
32
+
```
33
+
34
+
## Rebasing onto Upstream Master
35
+
36
+
To update your branch with the latest changes from upstream:
37
+
38
+
```bash
39
+
git remote add upstream https://github.com/lima-vm/lima.git # Only needed once
40
+
git fetch upstream
41
+
git rebase upstream/master
42
+
```
43
+
44
+
## Troubleshooting
45
+
46
+
If you encounter issues during rebase:
47
+
48
+
```bash
49
+
git rebase --abort # Cancel the rebase and return to original state
0 commit comments