Home java How to add your code / project on GitHub?

How to add your code / project on GitHub?




Hello! For two days I can not add my project on GitHub.
I work with Java in Inteliji Idea, first stayed to add directly with Inteliji using the Share With GitHub button, added a whole project with a bunch of unnecessary information. That is, I only need to add code and that’s it. Create one reprosor for all the following laboratory.

Answer 1, Authority 100%

Andria, first Configure the .gitignore file, enter those files \ folders that do not need to download the GIT server. Example File .Gitignore :

* IML.

You will need to specify the folders that you do not need on the GIT server. Next, create a project on the GIT and after download it.

  1. CD / Path / To / Project
  2. Git Init
  3. Git Remote Add Origin Git @ [Your_Git_Host]: [Your_login] / [Your_Project] .git
  4. Git Add.
  5. Git Commit -m "Initial Commit"
  6. Git Push -u Origin Master

Answer 2, Authority 50%

  1. When creating a new repository on the github Select the Add .Gitignore checkbox and in the search bar, type Java .
  2. Select the Java appeared. GitHub will form a necessary template that will not add to the repository “bunch of unnecessary information”:

  1. Copy the file .gitignore to local repository.
  2. Remove and re-create a repository on Github.

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