notes/git.md
2021-09-01 13:23:49 +01:00

27 lines
307 B
Markdown
Executable File

---
author: Alvie Rahman
date: \today
title: Git notes
tags: [ linux, programming, git ]
---
# Fix detached head
From https://stackoverflow.com/a/10229202 :
## To Delete Changes
```
git checkout main
```
## To Keep Changes
```
git branch temp
git checkout main
git pull . temp
git branch -D temp
```