Monday 24 April 2023

How to setup GIT repository in Intelij ?

 



Pipeline Script Fundamentals

Click Here:   DevOps Related Posts

 Check GIT commands for Interview preparation SET-1:

GIT Interview Question 1 to 11

Check GIT commands for Interview preparation SET-2:

GIT Interview Question 12 to 21

Check GIT commands for Interview preparation SET-3:

GIT Interview Question 21 to 30


Set up Git repository

When you clone an existing Git repository or put an existing project under Git version control, IntelliJ IDEA automatically detects if git is installed on your computer. If the IDE can't locate the git executable, it suggests downloading it.

IntelliJ IDEA supports Git from the Windows Subsystem for Linux 2 (WSL2), which is available in Windows 10 version 2004.

If Git is not installed on Windows, IntelliJ IDEA searches for Git in WSL and uses it from there. Also, IntelliJ IDEA automatically switches to Git from WSL for projects that are opened when you use the \\wsl$ path.

If you need to manually configure IntelliJ IDEA to use Git from WSL, go to the Version Control | Git page of the IDE settings ⌘ ,, click the Browse icon in the Path to Git executable field and select Git from WSL via the \wsl$ path, for example, \\wsl$\debian\usr\bin\git.


Check out a project from a remote host (clone)


IntelliJ IDEA allows you to check out (in Git terms clone) an existing repository and create a new project based on the data you've downloaded.

  • From the main menu, select Git | Clone, or, if no project is currently opened, click Get from VCS on the Welcome screen.

  • In the Get from Version Control dialog, specify the URL of the remote repository you want to clone, or select one of the VCS hosting services on the left.
    If you are already logged in to the selected hosting service, completion will suggest the list of available repositories that you can clone.


  • Click Clone. If you want to create a project based on the sources you have cloned, click Yes in the confirmation dialog. Git root mapping will be automatically set to the project root directory.
    If your project contains submodules, they will also be cloned and automatically registered as project roots.

  • When you import or clone a project for the first time, IntelliJ IDEA analyzes it. If the IDE detects more than one configuration (for example, Eclipse and Gradle), it prompts you to select which configuration you want to use.


    If the project that you are importing uses a build tool, such as Maven or Gradle, we recommend that you select the build tool configuration.


    Select the necessary configuration and click OK.
  • The IDE pre-configures the project according to your choice. For example, if you select Gradle, IntelliJ IDEA executes its build scripts, loads dependencies, and so on.

Put an existing project under Git version control


You can create a local Git repository based on the existing project sources.


Associate the entire project with a single Git repository

  • Open the project that you want to put under Git.

  • Press ⌃ V to open the VCS Operations Popup and select Enable Version Control Integration.

    Alternatively, from the main menu, select VCS | Enable Version Control Integration.

  • Choose Git as the version control system and click OK.

  • After VCS integration is enabled, IntelliJ IDEA will ask you whether you want to share project settings files via VCS. You can choose Always Add to synchronize project settings with other repository users who work with IntelliJ IDEA.

Associate different directories within the project with different Git repositories

  • Open the project that you want to put under Git.
  • From the main menu, choose VCS | Create Git Repository.
  • In the dialog that opens, specify the directory where a new Git repository will be created.
    Git does not support external paths, so if you choose a directory that is outside your project root, make sure that the folder where the repository is going to be created also contains the project root.
  • If you are creating multiple Git repositories inside the project structure, repeat the previous steps for each directory.

After you have initialized a Git repository for your project, you need to add project files to the repository.


Add files to the local repository

  • In the Commit tool window ⌘ 0, expand the Unversioned Files node.

  • Select the files you want to add to Git or the entire changelist and press ⌥ ⌘ A or choose Add to VCS from the context menu.
  • You can also add files to your local Git repository from the Project tool window: select the files you want to add, and press ⌥ ⌘ A or choose Git | Add from the context menu.

When Git integration is enabled in your project, IntelliJ IDEA suggests adding each newly created file under Git, even if it was added from outside IntelliJ IDEA. You can change this behavior in the Version Control | Confirmation page of the IDE settings ⌘ ,. If you want certain files to always remain unversioned, you can ignore them.



If you attempt to add a file that's on the .gitignore list, IntelliJ IDEA will suggest force adding it. Clicking Cancel in the confirmation dialog only cancels force adding ignored files - all other files will be added to the Git repository.



*******************************************************************
For any doubts or career guidance from me, reach out here : https://topmate.io/sidharth_shukla

********************************************************************

These commands cover a range of basic UI interactions and are a good starting point for building automated tests with Cypress.

Do remember that knowing Linux is one of the most important aspect to work as an SDET.

Basic Linux Commands for Automation QA


****************************************

TOP 15 BDD - CUCUMBER Interview Q&A


************************************************

✍️AUTHORLinkedIn Profile

************************************************

Learn (API-Microservice)Testing+ Selenium UI Automation-SDET with Self Paced Videos prepared by FAANG employees and LIVE Doubt Session 

SDET TRANING VIDEOS AVAILABLE with Live Doubt Session(course-1 below,API TRaining Videos With Class Notes and Coding Set) and (API+UI, both course-1 & 2 below) Check Training Page for Course Content or reach out @whatsapp +91-9619094122. 
This includes classnotes, 300+ interview questions, 3 projects, Java Coding question set for product companies along with career guidance from FAANG employees for Automation and SDET.

For more details whatsapp : https://lnkd.in/dnBWDM33

*************************************************

SeleniumWebdriver Automation Testing Interview Questions:

https://automationreinvented.blogspot.com/search/label/SeleniumWebdriver

API Testing Interview Question Set:

https://automationreinvented.blogspot.com/2022/03/top-80-api-testing-interview-questions.html

DevOps Interview Q&A:

https://automationreinvented.blogspot.com/2021/11/top-11-devops-interview-questions-and.html 

Kubernetes Interview Question Set

https://automationreinvented.blogspot.com/search/label/Kubernetes

Docker Interview Question Set

https://automationreinvented.blogspot.com/Docker

Linux Interview question Set

https://automationreinvented.blogspot.com/search/label/Linux

Automation Testing/SDET Framework Design

https://automationreinvented.blogspot.com/search/label/FrameworkDesign

Java Related Interview Question Set

https://automationreinvented.blogspot.com/search/label/Java

GIT Interview Question Set:

https://automationreinvented.blogspot.com/2021/09/top-40-git-interview-questions-and.html

Coding Interview Question Set:

https://automationreinvented.blogspot.com/search/label/Coding%20Questions

Mobile Testing Interview Question Set:

https://automationreinvented.blogspot.com/search/label/Mobile%20Testing

Python Interview Question Set for QAE - SDET - SDE:

https://automationreinvented.blogspot.com/search/label/Python


No comments:

Post a Comment

All Time Popular Posts

Most Featured Post

Sorting with Examples & Time Complexity for SDET

  🔺 LinkedIn: https://www.linkedin.com/in/sidharth-shukla-77b53145/ 🔺 Telegram Group:  https://t.me/+FTf_NPb--GQ2ODhl Bubble Sort:    Bubb...