Steps to register Java files on GitHub

Since I am a beginner, I sometimes forget it, so it is a memorandum.

1. Create a local repository

Open Terminal, cd to the directory containing the Java file you want to register, and hit the following command. $ git init

2. Generate .gitignore

.gitignore is written to specify the type of file you do not want to register (class file in Java). As the name implies, it ignores the specified file. There are several ways to make it, but I use gibo. gibo is an excellent one that automatically generates a .gitignore file. Type the following command.

gibo java >> .gitignore



 This is the end of local work.

# 3. Create a remote repository
 Go to GitHub and create a new repository.
 At that time, you can select the option to automatically generate .gitignore, but do not select it because it has already been created.
 Once the repository is created, the HTTPS URL will be issued, so copy it.

# 4. Associate the remote repository with the local repository.
 Type the following command:
```$ git remote add origin url```
 Paste the remote HTTPS URL you copied earlier into the URL part.

5. add, commit & push!

$ git add . $ git commit -m "remote upload" $ git push -u origin master

### that's all!


Recommended Posts

Steps to register Java files on GitHub
[Java] 4 steps to implement splash screen on Android
How to run Java EE Tutial on github on Eclipse
Confirm public key ~ Register key on Github ~ Push Rails app to Github
Steps to run docker on Mac
[Java] How to update Java on Windows
How to disassemble Java class files
How to decompile java class files
Steps to install MySQL 8 on CentOS 8
Steps to install devtoolset-6 on CentOS 7
How to check Java installed on Mac
Run Embulk on Docker to convert files
[Java] How to output and write files!
How to switch Java versions on Mac
Convert SVG files to PNG files in Java
[Java] Introduction to Java
Introduction to java
Steps to push Docker image to GitHub Container Registry (ghcr.io)
How to input / output IBM mainframe files in Java?
How to use java non-standard library on IntelliJ IDEA
Steps to set up Postfix and Dovecot on CentOS 8.3
Steps to set up a VNC server on CentOS 8.3
Android-Upload image files to Azure Blob Storage in Java
As of April 2018 How to get Java 8 on Mac
Introducing New Relic to Java apps running on Heroku
Notes on how to use regular expressions in Java
Let's touch on Java
Changes from Java 8 to Java 11
Sum from Java_1 to 100
Steps to deploy to Heroku
Install Java on Mac
[Java] Connect to MySQL
Run PostgreSQL on Java
Steps to deploy Struts 2.5.8
Kotlin's improvements to Java
From Java to Ruby !!
Try actions on GitHub [actions]
Introduction to java command
Setting method to link Java of Eclipse and Github / September 2017
How to deploy a simple Java Servlet app on Heroku
Links that I referred to before running Elasticsearch 7.7 on Java 11
How to deploy a kotlin (java) app on AWS fargate
How to install java9 on elementaryOS Freya or Ubuntu 14.04 LTS
How to develop and register a Sota app in Java
How to switch Java in the OpenJDK era on Mac
How to play MIDI files using the Java Sound API
Zip and upload multiple files to Firebase Storage on Android.