Home git How to properly create an Intellij IDEA project integrated in GitHub?

How to properly create an Intellij IDEA project integrated in GitHub?




banned specifically. Create the GRADLE project, I can not clone on the GitHub repository, cloning the turnip from GitHub, get Master & Amp branches; Main at different levels in the folder. Unite it does not work.
Friends! Teach how to create a project properly, with GRADLE & AMP support; GitHub at the same time ??

  1. Create a repository Github
  2. Create a project running gradele.
  3. in Git Bash I fall into the local repository,
  4. perform a git clone.
    I get Head Master, although cloned Main. As a result, the project in the project. When performing Push, Main branch is copied, Master is not.

Thank you.

I transferred all the correspondence on this question to paper. Huge human thanks to everyone !!!

Answer 1, Authority 100%

When you make a clone at the 4th stage, then yes, you clone the project inside your. What to do? Do not clone, you only create a project.

Reply 4 point. First you need to initialize the project Git Init.

We add origin, it looks like somewhere and github these teams and offers

git remote Add origin [email protected]: user / userrepo.git

But now we have a problem. There is a project on the server and you have local. Therefore, we make Git Pull and Merge / Rebezim, if necessary.

And now you can safely make Git Push and the project will fly to GitHub.

Master / Main. Previously, Git was to use Master for the first branch itself. But then some people decided that this name is a little infringe on them and went the movement to remove such names wherever possible. And it was decided to replace on Main. GitHub chose an intermediate strategy – they default for new projects offer Main. And the old offered to rename (which sometimes leads to a pile of different problems :)).

But in general, in the IDEA there is a “Share” button, with which you can “publish your project – https://www.jetbrains.com/help/idea/manage-projects-hosted-on-github.html#jump_to_github_version And you don’t need anything on Hithabe Create. But here all with pictures and beautiful.

Answer 2

There are two principal ways, how to start working with a repository in Github.

Creating zero

Here the sequence of actions is:

  1. Create a repository on github
  2. cloning it to the local computer
  3. add the project files to the junction directory

Sequence is described in Readme after creating a repository or here .

Creating out of existing sources

In this case, the sequence is this:

  1. Create a repository on github
  2. Initialize repository in the local folder with source
  3. add github repository as Remote repository to created locally
  4. Make Git Pull

in detail, with all the commands, the sequence is described here .

Answer 3

Fuh .. Understood … Remove the repository from Githab, created a project running GRADLE, on VCC, Import Into Version Control, Share Project On GitHub. Created a repository, got under the control of Git on Head Master. I got everything wanted.
Thanks to everyone for not indifference to my problem.

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions