GIT Switch branch is unsuccessful

Source: Internet
Author: User

This error occurred during the branch switch in idea, causing the switch to fail: Error:the following untracked working tree files would be overwritten by checkout
The error indicates that some of the problems caused by untracked working tree files. So as long as the solution of these untracked files can solve this problem.

Workaround:

open sourcetree through the command line, into the local version of the repository directory, directly execute the git clean-d-fx can be. Probably a lot of people do not understand what-d,-fx mean, in fact, git clean-d-fx said: Delete some files without git add;

git clean parameter- 

n shows the files and directories to be deleted;-

x-----Delete ignore file Files that have not been recognized for git-

d-----Delete files that have not been added to Git's path-

f-----Force

git clean-n

git clean-df

git clean-f

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.