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

More than 1 year has passed since last update.

Flutterでプロジェクト生成時にそれをGitHubリポジトリ化する手順

Posted at

いつも忘れるのでメモ。
既存ディレクトリをGitHubにプッシュする流れ。

1. Githubリポジトリを作成する

Flutterプロジェクト作成時に README.md も生成されるので、README.mdは無しで良い

2. Flutterプロジェクトを作成する

こんなのができる

% ls -l
total 64
drwxr-xr-x  19 kentaro  staff   608  5 10 20:25 ./
drwxr-xr-x  10 kentaro  staff   320  5 10 20:25 ../
drwxr-xr-x   6 kentaro  staff   192  5 10 20:25 .dart_tool/
-rw-r--r--   1 kentaro  staff   701  5 10 20:25 .gitignore
drwxr-xr-x   6 kentaro  staff   192  5 10 20:25 .idea/
-rw-r--r--   1 kentaro  staff  1668  5 10 20:25 .metadata
-rw-r--r--   1 kentaro  staff   551  5 10 20:25 README.md
-rw-r--r--   1 kentaro  staff  1453  5 10 20:25 analysis_options.yaml
drwxr-xr-x  12 kentaro  staff   384  5 10 20:25 android/
-rw-r--r--   1 kentaro  staff   842  5 10 20:25 hogehoge.iml
drwxr-xr-x   7 kentaro  staff   224  5 10 20:25 ios/
drwxr-xr-x   3 kentaro  staff    96  5 10 20:25 lib/
drwxr-xr-x   8 kentaro  staff   256  5 10 20:25 linux/
drwxr-xr-x   7 kentaro  staff   224  5 10 20:25 macos/
-rw-r--r--   1 kentaro  staff  5262  5 10 20:25 pubspec.lock
-rw-r--r--   1 kentaro  staff  3872  5 10 20:25 pubspec.yaml
drwxr-xr-x   3 kentaro  staff    96  5 10 20:25 test/
drwxr-xr-x   6 kentaro  staff   192  5 10 20:25 web/
drwxr-xr-x   6 kentaro  staff   192  5 10 20:25 windows/

3. Gitリポジトリ化してコミット

git init
git remote add origin git@github.com:ユーザ名/リポジトリ名.git
git add *
git commit -m 'first commit'
git push origin main

以上

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