mirror of
https://github.com/namibia/tips.git
synced 2025-02-02 19:48:24 +00:00
Merge pull request #134 from shfshanyue/master
Add alternative for git checkout -
This commit is contained in:
commit
2e8cfda782
@ -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
|
||||
|
@ -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"
|
||||
}]
|
||||
}]
|
||||
|
Loading…
x
Reference in New Issue
Block a user