About 5,710,000 results
Open links in new tab
  1. What does git checkout do? - Stack Overflow

    Nov 3, 2021 · The git checkout command is very complicated. It's so complicated that someone finally, as of Git 2.23, split it into two separate commands: git switch, which does the "select other branch or …

  2. 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)

  3. 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 …

  4. git checkout - How do I revert a Git repository to a previous commit ...

    Nov 6, 2010 · git commit The git-revert manpage actually covers a lot of this in its description. Another useful link is this git-scm.com section discussing git-revert. If you decide you didn't want to revert …

  5. How do I discard unstaged changes in Git? - Stack Overflow

    For a specific file use: git restore path/to/file/to/revert That together with git switch replaces the overloaded git checkout (see here), and thus removes the argument disambiguation. If a file has both …

  6. git - How to change line-ending settings - Stack Overflow

    Is there a file or menu that will let me change the settings on how to deal with line endings? I read there are 3 options: Checkout Windows-style, commit Unix-style Git will convert LF to CRLF when

  7. Checkout subdirectories in Git? - Stack Overflow

    Oct 8, 2008 · git sparse-checkout set --no-cone /small git checkout This option was added together with an update to the remote protocol, and it truly prevents objects from being downloaded from the …

  8. 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 …

  9. 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.

  10. Rollback to an old Git commit in a public repo - Stack Overflow

    Use git checkout and the commit hash. Edit: As was pointed out in the comments, using git checkout without specifying a branch will leave you in a "no branch" state. Use git checkout <commit> -b …