نکات کاربردی

طبقه بندی موضوعی

آخرین مطالب

مراحل افزودن پروژه به Git

چهارشنبه, ۵ آبان ۱۳۹۵، ۰۸:۰۵ ب.ظ
1-Setting Up a Local Git Repository

create a local Git repository

  1. Open the project you want to store in a repository.
  2. On the main menu, choose VCS | Import into Version Control | Create Git Repository.
  3. In the dialog that opens, specify the directory where you want to create a new Git repository.
  4. Put the required files under Git version control. The files appear in the Local Changes tab of the Version Control tool window, under the Default changelist


2-Adding Files to a Local Git Repository

View | Tool Windows | Version Control - Local Changes
Alt+9

Basics

After a Git repository for a project is initialized, you need to add the project data to it.


Adding all currently unversioned files to Git control

  1. Switch to the Version Control tool window and switch to the Local Changes tab. tool window.
  2. Expand the Unversioned Files node and choose Add to VCS from the context menu or pressCtrl+Alt+A.

Adding specific files to a local Git repository

Do one of the following:

  • Switch to the Version Control tool window and switch to the Local Changes tab. Expand the Unversioned Files node, and select the files to be added. From the context menu, chooseAdd to VCS, or press Ctrl+Alt+A.
  • Switch to the Project tool window and select the files to be added. From the context menu, choose Git | Add or pressCtrl+Alt+A.


***

Adding Files to Version Control

If a new file is created with IntelliJ IDEA in a directory that is already under version control, it automatically adds to the active changelist with the status Added. All you have to do, is to commit this change.

IntelliJ IDEA's behavior on adding files is configurable in the General Settings tab of the Version Control dialog.

If a new file is created outside of IntelliJ IDEA, or silent adding is disabled, you have to explicitly add it to the version control.

Another approach is VCS-specific. You can import an entire directory to your repository, provided that you have the corresponding access rights. This action is helpful for putting a whole project under version control.

To explicitly add a file to version control

  1. Select file in the Project tool window.
  2. On the main Version Control menu or on the context menu of the selected file, choose <VCS> | Add.

    Alternatively, use the Version Control tool window. Select the desired files in the Unversioned files changelist in the Local Changes tab, and choose Add to VCS on the context menu, or just drag it to the target changelist.

    img
  3. Select the added file in the changelist and check in (commit) changes.

۹۵/۰۸/۰۵ موافقین ۰ مخالفین ۰
behrad nasehi

Git

Local

VCS

Version Control

نظرات  (۰)

هیچ نظری هنوز ثبت نشده است

ارسال نظر

ارسال نظر آزاد است، اما اگر قبلا در بیان ثبت نام کرده اید می توانید ابتدا وارد شوید.
شما میتوانید از این تگهای html استفاده کنید:
<b> یا <strong>، <em> یا <i>، <u>، <strike> یا <s>، <sup>، <sub>، <blockquote>، <code>، <pre>، <hr>، <br>، <p>، <a href="" title="">، <span style="">، <div align="">
تجدید کد امنیتی