Merge pull request #134 from shfshanyue/master

Add alternative for git checkout -
This commit is contained in:
hemanth.hm 2017-02-16 09:39:50 +05:30 committed by GitHub
commit 2e8cfda782
2 changed files with 9 additions and 2 deletions

View File

@ -229,6 +229,12 @@ git branch --merged master
git checkout -
```
__Alternatives:__
```sh
git checkout @{-1}
```
## Remove branches that have already been merged with master
```sh
git branch --merged master | grep -v '^\*' | xargs -n 1 git branch -d

View File

@ -34,7 +34,8 @@
"tip": "git branch --merged master"
}, {
"title": "Quickly switch to the previous branch",
"tip": "git checkout -"
"tip": "git checkout -",
"alternatives": ["git checkout @{-1}"]
}, {
"title": "Remove branches that have already been merged with master",
"tip": "git branch --merged master | grep -v '^\\*' | xargs -n 1 git branch -d",
@ -458,4 +459,4 @@
}, {
"title": "Backup untracked files.",
"tip": "git ls-files --others -i --exclude-standard | xargs zip untracked.zip"
}]
}]