mirror of
https://github.com/autistic-symposium/shell-whiz-toolkit.git
synced 2025-05-12 19:52:14 -04:00
(:
This commit is contained in:
parent
b0a4e417ee
commit
8eb026b445
1 changed files with 36 additions and 8 deletions
|
@ -2,41 +2,43 @@
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
### reset all commits
|
### reset all commits
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
#### check out to a temporary branch:
|
##### check out to a temporary branch:
|
||||||
|
|
||||||
```
|
```
|
||||||
git checkout --orphan TEMP_BRANCH
|
git checkout --orphan TEMP_BRANCH
|
||||||
```
|
```
|
||||||
|
|
||||||
#### add all the files:
|
##### add all the files:
|
||||||
|
|
||||||
```
|
```
|
||||||
git add -A
|
git add -A
|
||||||
```
|
```
|
||||||
|
|
||||||
#### commit the changes:
|
##### commit the changes:
|
||||||
|
|
||||||
```
|
```
|
||||||
git commit -am "🛹👾"
|
git commit -am "(:"
|
||||||
```
|
```
|
||||||
|
|
||||||
#### delete the old branch:
|
##### delete the old branch:
|
||||||
|
|
||||||
```
|
```
|
||||||
git branch -D main
|
git branch -D main
|
||||||
```
|
```
|
||||||
|
|
||||||
#### rename the temporary branch to `main`:
|
##### rename the temporary branch to `main`:
|
||||||
|
|
||||||
```
|
```
|
||||||
git branch -m main
|
git branch -m main
|
||||||
```
|
```
|
||||||
|
|
||||||
#### finally, force update to our repository:
|
##### finally, force update to our repository:
|
||||||
|
|
||||||
```
|
```
|
||||||
git push -f origin main
|
git push -f origin main
|
||||||
|
@ -44,6 +46,32 @@ git push -f origin main
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### reverting back to an older commit
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git reset --hard HEAD~N
|
||||||
|
```
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git reset --hard COMMIT
|
||||||
|
```
|
||||||
|
|
||||||
|
and then
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git push origin master --force
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### delete all local branches
|
### delete all local branches
|
||||||
|
@ -62,7 +90,7 @@ git branch | grep -v "main" | xargs git branch -D
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
#### error: RPC failed; HTTP 400 curl 22 The requested URL returned error: 400
|
##### error: RPC failed; HTTP 400 curl 22 The requested URL returned error: 400
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
git config http.postBuffer 524288000
|
git config http.postBuffer 524288000
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue