Autosave: 2022-12-09 08:30:05
This commit is contained in:
parent
cdb4e24d24
commit
e0457aeff1
3 changed files with 39 additions and 1 deletions
19
DevOps/Git/Delete_a_branch.md
Normal file
19
DevOps/Git/Delete_a_branch.md
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
---
|
||||||
|
categories:
|
||||||
|
- DevOps
|
||||||
|
tags: [git]
|
||||||
|
---
|
||||||
|
|
||||||
|
# Delete a branch
|
||||||
|
|
||||||
|
### Locally
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git branch -d <local_branch_name>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Remote
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git push origin --delete <remote_branch_name>
|
||||||
|
```
|
19
DevOps/Git/Rename_a_branch.md
Normal file
19
DevOps/Git/Rename_a_branch.md
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
---
|
||||||
|
categories:
|
||||||
|
- DevOps
|
||||||
|
tags: [git]
|
||||||
|
---
|
||||||
|
|
||||||
|
# Rename a branch
|
||||||
|
|
||||||
|
### In local development
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git branch -m <old_name> <new_name>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Update the remote
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git push origin -u <new_name>
|
||||||
|
```
|
|
@ -19,5 +19,5 @@ fi
|
||||||
|
|
||||||
git pull
|
git pull
|
||||||
git add .
|
git add .
|
||||||
git commit -q -m "Last Sync: $(date +"%Y-%m-%d %H:%M:%S")"
|
git commit -q -m "Autosave: $(date +"%Y-%m-%d %H:%M:%S")"
|
||||||
git push -q
|
git push -q
|
||||||
|
|
Loading…
Add table
Reference in a new issue