Skip to content

Commit ef10641

Browse files
committed
Update Git cheatsheet note
1 parent 109573a commit ef10641

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

src/content/notes/cheatsheet-git.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Cheatsheet: Git"
33
dateCreated: 2024-11-12
4-
dateUpdated: 2024-11-12
4+
dateUpdated: 2025-08-25
55
---
66

77
This cheatsheet assumes that you're already familiar with Git concepts and know the usual `init`, `pull`, `add`, `commit`, `push` flow. It aims to document commands and flags that I tend to use but forget when I haven't used them in a while.
@@ -100,6 +100,12 @@ git stash -m <message>
100100
git stash list
101101
```
102102

103+
### Show changes in stash
104+
105+
```console
106+
git stash show [<index>]
107+
```
108+
103109
### Apply stash to current working tree
104110

105111
```console
@@ -234,6 +240,24 @@ Or to discard the changes you've done so far and exit the interactive rebase:
234240
git rebase --abort
235241
```
236242

243+
## Rebasing
244+
245+
### Fix rebase conflicts
246+
247+
When conflicts occur from a `git rebase` or a `git pull --rebase`. Fix the files with conflicts, stage them, then run:
248+
249+
```console
250+
git rebase --continue
251+
```
252+
253+
## Pushing
254+
255+
### Push to a remote branch with a different name
256+
257+
```console
258+
git push [<repository>] <local-branch>:<remote-branch>
259+
```
260+
237261
## References
238262

239263
- <https://git-scm.com/docs>

0 commit comments

Comments
 (0)