3
2

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.

Git Hub ポスト 手順

Last updated at Posted at 2016-02-20

1、Githubページでニューリポジトリ押す

  リポジトリとは、ファイルやディレクトリの状態を記録する場所です。
  ソースコードを保存 

2,terminalにて
git init
リポジトリの作成をする。(1番手前の場所で)

vim .gitignore
 開く。ここでは、確認だけ

`config/database.yml
*.DS_Store
*.swp

vendor/bundle`

git remote add origin https://github.com/oyaoyaoya/profiele.git
 リモートリポジトリの追加 
  リモート=github上のリポジトリ
 origin=github(このパソコンのoriginがgithub)

git pull origin master
他のリポジトリの変更点をローカルリポジトリにマージする。

git remote
リモートリポジトリの一覧を表示したい
-v オプションを付けると、リモートリポジトリの詳細を表示することができる

git add .
コミットするファイルを指定する。
git add . はワーキングツリーに新規作成された、もしくは変更されたファイルをaddします。

git commit
git push origin master
オリジンのリモートリポジトリへのプッシュ

1、localにリポジトリを作成
2、remoteのリポジトリと繋げる
3、localからremoteへpush

⬛︎git役割
pushする前に確認

git status
変更点を確認

git diff
変更点の詳細を確認

swpファイル
=いらないファイル
=現在開かれてる

addされると緑になる

git commit -m"コメント"
addの時でない。

⬛︎修正後
git diff
変更点確認

git add ファイル名

git commit -m"ファイル名変えました"

git push 場所(一人の時はorigin master)

⬛︎見ながら
echo "# flashcard" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/oyaoyaoya/flashcard.git
git push -u origin master

3
2
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
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?