About 76,500 results
Open links in new tab
  1. 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 …

  2. github - How do I switch a branch in Git? - Stack Overflow

    Jul 13, 2021 · First, switching branch is done with git switch (since Git 2.23, Q3 2019), not git checkout (which tries to manage both files and branches, making it confusing) Second, git …

  3. What's the difference between 'git switch' and 'git checkout' …

    Jul 30, 2019 · What is the difference or use case? Two new commands "git switch" and "git restore" are introduced to split "checking out a branch to work on advancing its history" and …

  4. Switch branch and ignore any changes without committing

    when you switch to a branch without committing changes in the old branch, git tries to merge the changes to the files in the new branch. If merging is done without any conflict, swithing …

  5. How do you switch between branches in Visual Studio Code with …

    When in the Visual Studio Code IDE, do the following: on the bottom left, press on the Git branch which will give a list: Select a ref to checkout select one of the branches of the remote branch.

  6. git switch branch without discarding local changes

    You could use --merge / -m git checkout option: git checkout -m <another-branch> -m --merge When switching branches, if you have local modifications to one or more files that are different …

  7. git - Checkout another branch when there are uncommitted …

    Aug 27, 2017 · You may switch branches with uncommitted changes in the work-tree if and only if said switching does not require clobbering those changes. That is—and please note that this is …

  8. Move existing, uncommitted work to a new branch in Git

    Sep 8, 2009 · Update 2020 / Git 2.23 Git 2.23 adds the new switch subcommand in an attempt to clear some of the confusion that comes from the overloaded usage of checkout (switching …

  9. How can I check out a remote Git branch? - Stack Overflow

    Nov 23, 2009 · Maybe useful to someone else: When I used the Atom editor UI to fetch and pull changes, it pulled changes on the "main" branch but did not create a local reference to the …

  10. How to switch (or checkout) to an existing remote branch in Git …

    Jun 14, 2021 · I run git fetch origin develop. Then, I use git checkout develop and it switched to a new branch develop like this: It creates local new develop branch. How to switch to my origin …