.. _checkout: Checkout ======== Checkout a branch or paths to the working tree :: jgit checkout [-f|--force] [] jgit checkout [-f|--force] [] jgit checkout [--set-upstream|-t|--track|--no-track] [-f|--force] [[-b|-B] ] [] jgit checkout [-f|--force|--ours|--theirs|-m] [] [--] ... jgit checkout [] [--] [...] Reference: `git-checkout `_ Alias ----- co :: jgit co -b newfeature Examples -------- Checkout branch. :: jgit checkout master Checkout commit. NOTE: This will put you in a detached state. :: jgit checkout 971ae60 Checkout upstream branch as local. :: jgit checkout -b feature origin/feature Revert changes in unstaged file. :: jgit checkout -- file