mirror of
https://github.com/autistic-symposium/shell-whiz-toolkit.git
synced 2025-12-16 00:23:57 -05:00
add things resources from the last 5 years over machines
This commit is contained in:
parent
ac9c955e0b
commit
b0a4e417ee
77 changed files with 2327 additions and 84 deletions
74
git/README.md
Normal file
74
git/README.md
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
## useful git stuff
|
||||
|
||||
<br>
|
||||
|
||||
### reset all commits
|
||||
|
||||
<br>
|
||||
|
||||
#### check out to a temporary branch:
|
||||
|
||||
```
|
||||
git checkout --orphan TEMP_BRANCH
|
||||
```
|
||||
|
||||
#### add all the files:
|
||||
|
||||
```
|
||||
git add -A
|
||||
```
|
||||
|
||||
#### commit the changes:
|
||||
|
||||
```
|
||||
git commit -am "🛹👾"
|
||||
```
|
||||
|
||||
#### delete the old branch:
|
||||
|
||||
```
|
||||
git branch -D main
|
||||
```
|
||||
|
||||
#### rename the temporary branch to `main`:
|
||||
|
||||
```
|
||||
git branch -m main
|
||||
```
|
||||
|
||||
#### finally, force update to our repository:
|
||||
|
||||
```
|
||||
git push -f origin main
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
---
|
||||
|
||||
### delete all local branches
|
||||
|
||||
<br>
|
||||
|
||||
```shell
|
||||
git branch | grep -v "main" | xargs git branch -D
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
---
|
||||
|
||||
### troubleshooting
|
||||
|
||||
<br>
|
||||
|
||||
#### error: RPC failed; HTTP 400 curl 22 The requested URL returned error: 400
|
||||
|
||||
```shell
|
||||
git config http.postBuffer 524288000
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue