Git and Intellij Project Setup

If you are not interested to setup Git, then you can download the code from the GitHub project link.



If you are interested to setup Git, then download Git from Git Website and install it. 

Get Git repository link from GitHub.



Open Git Bash



Navigate to the location that you want your project to be copied to in Git Bash and type the command:

git clone <Git Repository link>

For example:

cd /d/projects/gitprojects/
git clone https://github.com/ajtechdeveloper/BasicDropwizard.git



Then import the project into Intellij by using either of the 2 options given below:

1. Import Project



2. Project from Existing Sources



In both cases, you will have to point to pom.xml and then click on OK and continue with Next button in the next few screens, select the JDK to be used and click on Finish 


     

Comments

  1. if there are two branches A and B
    A makes changes and push his changes on origin
    B makes changes
    then how to merge these changes ?

    ReplyDelete
    Replies
    1. Hi @KhamarSir
      Use Git Bash and execute the following commands as per my instructions:
      First checkout BranchA and pull the latest code from origin:
      git checkout BranchA
      git pull origin BranchA
      Then checkout BranchB:
      git checkout BranchB
      git merge BranchA
      If there are conflicts in merge, it will be displayed. You will have to merge the changes manually on the conflicted files.
      git commit -m "Comments"
      git push origin BranchB

      Delete

Post a Comment

Popular Posts

Dropwizard MySQL Integration Tutorial

Golang gRPC Microservice

Asynchronous Processing (@Async) in Spring Boot