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
. IDEA * IML. CONF Domain. Target.
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.
CD / Path / To / Project
Git Remote Add Origin Git @ [Your_Git_Host]: [Your_login] / [Your_Project] .git
Git Commit -m "Initial Commit"
Git Push -u Origin Master
Answer 2, Authority 50%
- When creating a new repository on the github Select the
Add .Gitignorecheckbox and in the search bar, type
- Select the
Javaappeared. GitHub will form a necessary template that will not add to the repository “bunch of unnecessary information”:
- Copy the file
.gitignoreto local repository.
- Remove and re-create a repository on Github.