LoginSignup
0
0

More than 3 years have passed since last update.

開発ファイルをgithubで管理する方法

Posted at

開発ファイルをgithubで管理する方法

新しく開発を始める時にそのファイルをGitやGithubで管理したい!
そんな時に使用するコマンドをメモがてら書きます。

1 管理したいファイルへの移動

cd 管理したいファイル名

2 git init

管理したいファイルまで移動したらgit initコマンドを打ちます。

git init

そうすることでファイルに.gitファイルが作成されます。
この.gitファイルにはGitで使用されるファイルが新しく作成されます。

3 git add .

git add .

ファイルの変更をステージングします。

4 git commit

git commit -m "コミットメッセージ"

変更をcommitします。

5 git hubに移動

git hubでファイル名と同じ名前のリポジトリを新規作成します。
リポジトリのURLが表示されるのでコピーします。

6 git remote add origin URL

コマンドで

git remote add origin コピーしたURL

こうすることでリモートリポジトリが作成されます。

7 git push

git push -u origin master

これでgitで管理することができます!!

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