1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

手元のフォルダをGitHubに上げる方法

1
Last updated at Posted at 2018-05-23

手元で作ってたプロジェクトをGitHubにまとめて上げる方法。
毎回悩むのでメモ。

 手順

まずブラウザからGitHubにログインし、新規レポジトリを作る。(例としてhogehogeという名前で)

次にローカルのフォルダ内で以下のコマンドを叩く。

$ git init
$ ###(必要に応じて書く)###
$ vim .git/info/exclude
$ vim .gitignore
$ ###(ここまで)###
$ git add .
$ git commit -m "initial commit"
$ ##つまづきやすいので注意!##↓ここで、GitHubからコピペしたリンクにユーザー名を付け加える(GitHubに公開鍵設定などしてない場合)
$ git remote add origin https://username@github.com/username/hogehoge.git
$ git push origin master

以上。

参考

【GitHub超初心者入門】この前初めてGitHubを使い始めたエンジニア見習いが書くGitHubの使い方と実践~とりあえず一緒に動かしてみようぜ!~
gitでpushしようとしたら403された話

1
1
1

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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?