[RAILS] Until you push to Github

I had a lot of trouble before pushing to GitHub I would like to record it again so that it will not be the same.

environment

1. Creating a repository

-Click New in Repositories on GitHub --Enter your favorite name (name of the app you are making) in Repository name ――Please decide Public (public) Private (private) as you like --Completion of repository creation with create Repository

2. From init to commit with VS Code

--Click Open Folder to open the project you want to push and enter the code below

Terminal


$ git init
$ git add -A
$ git commit -m "comment"

Select all files under the current directory with add -A Leave a commit message with commit -m

Now you are ready to push!

  1. push

Terminal


$ git remote add origin https://github.com/username/Repository name_app.git
$ git push -u origin master

last

Now push is done. If this doesn't work, I'll edit it again. If you have any other advice or suggestions, please let us know.

Recommended Posts

Until you push to Github
Until you introduce fonts to Rails
Until you create a Spring Boot project in Intellij and push it to Github
Docker push to GitHub Container Registry (ghcr.io)
[GCP] Until you push the local Docker image to the Container Registry
What to do if you push incorrect information
Nice to meet you.
Steps to push Docker image to GitHub Container Registry (ghcr.io)
Push Docker images from GitHub Actions to GitHub Container Registry
I want to push an app made with Rails 6 to GitHub
GitHub Actions Introduction to self-made actions
[Personal notes] How to push a Docker image to GitHub Packages
Confirm public key ~ Register key on Github ~ Push Rails app to Github
Response to Github vulnerability alerts
Minimal Workflow to push Docker image to Github Container Registry with Github Actions
Send a pull request to GitHub
To you who absolutely need backtrace
What to do if you get a MiniMagick vulnerability alert on GitHub