mirror of
https://github.com/autistic-symposium/shell-whiz-toolkit.git
synced 2025-05-12 19:52:14 -04:00
add things resources from the last 5 years over machines
This commit is contained in:
parent
ac9c955e0b
commit
3efc19e1f2
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>
|
||||
|
||||
|
||||
|
6
git/gi.sh
Executable file
6
git/gi.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
input_variable = 'test'
|
||||
read -p "Commit message?" input_variable
|
||||
git add -A
|
||||
git commit -m "$input_variable"
|
||||
git push origin master
|
4
git/gitpass.sh
Normal file
4
git/gitpass.sh
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
|
||||
ssh-add ~/.ssh/git/git_rsa
|
Loading…
Add table
Add a link
Reference in a new issue