mirror of
https://github.com/namibia/tips.git
synced 2025-01-24 07:38:35 +00:00
Tip from @vinkla
This commit is contained in:
commit
c68571f98e
13
README.md
13
README.md
@ -23,6 +23,19 @@ git update-ref -d HEAD
|
|||||||
git diff --name-only --diff-filter=U
|
git diff --name-only --diff-filter=U
|
||||||
```
|
```
|
||||||
|
|
||||||
|
# List all branches that are already merged into master
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git checkout master
|
||||||
|
git branch --merged
|
||||||
|
```
|
||||||
|
|
||||||
|
# Quickly switch to the previous branch
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git checkout -
|
||||||
|
```
|
||||||
|
|
||||||
# Remove branches that have already been merged with master
|
# Remove branches that have already been merged with master
|
||||||
```sh
|
```sh
|
||||||
git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d
|
git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d
|
||||||
|
Loading…
x
Reference in New Issue
Block a user