---
title: "Discussion on \"How to checkout recent branch in git?\" | Hashnode"
description: "Discussion on \"How to checkout recent branch in git?\". Use the following command to checkout recent branch:\ngit checkout -\n\nIt's basically an alias for:\ngit checkout @{-1}\n\nYou can checkout any previous branch, by replacing N with the N-th last branch that was checked out.\ngit checkout @{-N}\n\nFollowing d..."
url: "https://hashnode.com/posts/how-to-checkout-recent-branch-in-git/63694e258debf848cc8ddaef"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to checkout recent branch in git?](https://blog.macieksitkowski.com/how-to-checkout-recent-branch-in-git?utm_source=hashnode&utm_medium=feed)

Use the following command to checkout recent branch: git checkout - It's basically an alias for: git checkout @{-1} You can checkout any previous branch, by replacing N with the N-th last branch that was checked out. git checkout @{-N} Following d...

Nov 7, 2022 · 1 min read · blog.macieksitkowski.com  
Read the article

-   [#git](https://hashnode.com/tag/git)
-   [#2articles1week](https://hashnode.com/tag/2articles1week)

## Written by

[Maciek Sitkowski](https://hashnode.com/@sitek94)

@sitek94 · Poland

  
[View profile](https://hashnode.com/@sitek94)

mostly frontend

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
