简体   繁体   English

你如何在pycharm中创建一个gitignore文件? (视窗)

[英]How do you create a gitignore file in pycharm? (windows)

我可以找到与 pycharm 上的 git 设置相关的内容

Create a file with name .gitignore in the root directory of your project.在项目的根目录中创建一个名为.gitignore的文件。 Add all the files which you want git to ignore while versioning, in it.在其中添加您希望 git 在版本控制时忽略的所有文件。

  1. Open Git Bash from git for windowsgit for windows打开 Git Bash

  2. Run command:运行命令:

    cd '{your_root_directory_path}' cd '{your_root_directory_path}'

  3. Run command:运行命令:

    touch .gitignore触摸 .gitignore

In the Project tool window, select one or more files you wish to be ignored, then right click on the selection, then Git > Add to .gitignore > Add to .gitignore .Project工具窗口中,选择一个或多个您希望忽略的文件,然后右键单击所选内容,然后Git > Add to .gitignore > Add to .gitignore If the .gitignore file does not exist, you will be asked for confirmation to create it.如果.gitignore文件不存在,系统将要求您确认创建它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM