About 275,000 results
Open links in new tab
  1. git checkout - How can I check out a remote Git branch? - Stack Overflow

    Nov 23, 2009 · How do I check out the remote test branch? I can see it with git branch -r. I tried: git checkout test, which does nothing git checkout origin/test gives * (no branch)

  2. What is the difference between "git branch" and "git checkout -b"?

    Nov 2, 2011 · git checkout -b newbranch: Creates a new branch and switches to that branch immediately. This is the same as git branch newbranch followed by git checkout newbranch.

  3. How can I switch to another branch in Git? - Stack Overflow

    Dec 4, 2017 · Switching to another branch in Git. Straightforward answer, git-checkout - Switch branches or restore working tree files git fetch origin # <---- This will fetch the branch git checkout …

  4. git - branch and checkout using a single command - Stack Overflow

    Jul 30, 2013 · $ git checkout -b new_branch_name I guess I was reading the man page for the wrong command, I was expecting this as part of the branch command, not for checkout. Quoting the man …

  5. git - How to branch from a previous commit - Stack Overflow

    If you are not sure which commit you want to branch from in advance you can check commits out and examine their code (see source, compile, test) by git checkout <sha1-of-commit> once you find the …

  6. How do I fix a Git detached head? - Stack Overflow

    git checkout master will get you back on the master branch. If you wanted to clear out any working copy changes, you probably wanted to do git reset --hard.

  7. git - Difference between "checkout" and "checkout -b" when remote ...

    Oct 9, 2018 · git checkout -b name commit-specifier —which you can invoke manually if you like, but is invoked for you by the DWIM mode—tries to create a new branch name name, using the given …

  8. How do I undo a checkout in git? - Stack Overflow

    For a single file: git checkout HEAD /path/to/file For the entire repository working copy: git reset --hard HEAD And if that doesn't work, then you can look in the reflog to find your old head SHA and reset to …

  9. git - Checkout existing remote branch - Stack Overflow

    When you perform git checkout -t origin/bigbug you are saying to Git to execute the same two commands above. The difference is that it will name the local branch with the same name of the …

  10. What do git checkouts really mean? - Stack Overflow

    Mar 8, 2013 · What are checkouts in git? I know once you do checkout to a particular branch, the HEAD points to that branch. But what does it really mean? Does it mean I can then work on that branch? If …