LoginSignup
3
4

More than 5 years have passed since last update.

gitlabでソースコード管理

Posted at

gitlabアカウント作成

〜省略〜

project作成

ssh key登録

*sshkeyを作成後、macだと以下のコマンドで公開鍵の内容をクリップボードにコピーできます。

pbcopy < ~/.ssh/id_rsa.pub

setup

さいごに、
「A:新しいリポジトリを作る場合」と「B:既存のフォルダがある場合」で違うので適宜

A:新しいリポジトリを作る場合

git clone git@gitlab.com:namitop/shortshortshort.git
cd shortshortshort
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master

B:既存のフォルダがある場合

cd existing_folder
git init
git remote add origin git@gitlab.com:namitop/shortshortshort.git
git add .
git commit -m "Initial commit"
git push -u origin master

雑記

  • githubからの移行とかも、それようのフローが示されていて簡単そう
  • gitlab pagesが便利そう
3
4
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
4