mirror of
https://github.com/namibia/tips.git
synced 2024-12-23 10:38:58 +00:00
Merge pull request #86 from codereflection/master
Adding alternative to deleting branches merged to master
This commit is contained in:
commit
ac572b9ebf
@ -188,6 +188,12 @@ git checkout -
|
|||||||
git branch --merged master | grep -v '^\*' | xargs -n 1 git branch -d
|
git branch --merged master | grep -v '^\*' | xargs -n 1 git branch -d
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
__Alternatives:__
|
||||||
|
```sh
|
||||||
|
git branch --merged master | grep -v '^\*\| master' | xargs -n 1 git branch -d # will not delete master if master is not checked out
|
||||||
|
```
|
||||||
|
|
||||||
## List all branches and their upstreams, as well as last commit on branch
|
## List all branches and their upstreams, as well as last commit on branch
|
||||||
```sh
|
```sh
|
||||||
git branch -vv
|
git branch -vv
|
||||||
|
@ -37,7 +37,8 @@
|
|||||||
"tip": "git checkout -"
|
"tip": "git checkout -"
|
||||||
}, {
|
}, {
|
||||||
"title": "Remove branches that have already been merged with master",
|
"title": "Remove branches that have already been merged with master",
|
||||||
"tip": "git branch --merged master | grep -v '^\\*' | xargs -n 1 git branch -d"
|
"tip": "git branch --merged master | grep -v '^\\*' | xargs -n 1 git branch -d",
|
||||||
|
"alternatives": ["git branch --merged master | grep -v '^\\*\\| master' | xargs -n 1 git branch -d # will not delete master if master is not checked out"]
|
||||||
}, {
|
}, {
|
||||||
"title": "List all branches and their upstreams, as well as last commit on branch",
|
"title": "List all branches and their upstreams, as well as last commit on branch",
|
||||||
"tip": "git branch -vv"
|
"tip": "git branch -vv"
|
||||||
|
Loading…
Reference in New Issue
Block a user