A little research on how zsh is judging the current git directory

Source: Internet
Author: User

Zsh goes into a git directory and reacts, showing that it's a git

So why not get into a normal folder? How exactly do you judge that?

I did a little experiment and set up a. Git directory under a normal folder, zsh in.

No response.

So git command, git init, zsh in.

Yes, the display is currently a git directory.

This is the case, so go in. git directory, delete the three files (the directory is not deleted), zsh in

No response, it appears to be related to the integrity of this file

So touch to create three empty files with the same name, and then zsh in

No response

Conclusion:

Zsh should be the judge of the current. Giit directory, and the contents of the integrity of the file and the legitimacy of the judgment, that is, so to determine whether the current git directory!

A little research on how zsh is judging the current git directory

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.