0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

「GitHub」に初めてpushしてみた!つまづいたポイントと解決法

Posted at

はじめに

こんにちは。プログラミング初心者のSoraです。今回はGitHubにコードをアップ(push)してみましたので、
・手順
・つまずいたポイント
・解決法
をまとめてみました!

やったこと

・GitHubでリポジトリを作成
・ターミナルgit initから一連の流れを実行
・無事、GitHubにコードが表示された!

使用環境

・Mac mini(M4)
・VSCode
・Git

手順

bash
git init
git add.
git comit -m"first commit"
git remote add origin https://github.com/ユーザー名/リポジトリ名.git
git push -u origin main

つまづいたポイントと解決法

①fatal: remote origin already exists. と出た

→すでに”remmote add”していたので、"git remote remove origin"で一度削除してやり直しました。

②push時に「パスワードを入力」と言われた

→GitHubでは普通のパスワードは使えない!「トークン」を使いました。

学んだこと

・Gitの仕組みが少し理解できた
・push前に"commit"を忘れると怒られる💦

次、学びたいこと

・「トークン」について

終わりに

初めてのpushで不安でしたがなんとなくイメージできたので、繰り返し取り組んで慣れていきたい。
誤認やアドバイスなどありましたらコメントくださいませ。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?