5
10

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.

初めてGitLabでコード管理してみた

Posted at

お金をかけずにprivateリポジトリを管理したかったので、GitLabを使ってみました。ローカルで作成していたソースコードをpushするところまでやってみます。

プロジェクトを作る

まずはGitLabでアカウントとプロジェクトを作ります。

GitLabのトップページの右上の「Sign In/Register」をクリックします。
1.Home.png

Registerタブをクリックし、今回はGoogleアカウントでSignInします。アカウントはすぐに作れます。
2.Register.png

空のプロジェクトを作ります。
3.CreateProject.png

てきとうなプロジェクト名をつけて、Privateに設定します。
4.NewProject.png

これで空のプロジェクトが完成です。

pushする

次に、ローカル環境からpushするために、パスワードを設定します。右上からSettingsをクリックします。
5.Setting.png

画面左側から :lock: のアイコンを選び、パスワードを設定します。

6.UserSetting.png

7.Password.png

次はローカル作業です。
ターミナルで次の操作を行います。

$ git add .
$ git commit -m "Initial commit"
$ git push -u origin master

Usernameは、GitLabへのログインに使うメールアドレス。
Passwordは、先ほど設定したGitLabへのログインパスワードです。

以上でGitLabへソースコードをpushできました。快適なGitLab生活を!

5
10
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
5
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?