diff --git a/README.md b/README.md index 82ea037..9220065 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/tips.json b/tips.json index 5e73ee3..568afc3 100644 --- a/tips.json +++ b/tips.json @@ -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" -}] \ No newline at end of file +}]