facebook twitter hatena line email

「Git/bitbucket」の版間の差分

提供: 初心者エンジニアの簡易メモ
移動: 案内検索
(プロジェクト作成とpush)
 
(同じ利用者による、間の14版が非表示)
行1: 行1:
==bitbucketとは==
+
[[git/bitbucket/基本]]
プライベートなgitが無料で無制限に使えるサービス
+
  
==リポジトリ作成==
+
[[git/bitbucket/プルリク]]
グローバルヘッダー/リポジトリ/リポジトリの作成/リポジトリ名をproject1と入力
+
 
+
==bitbucketに公開鍵を追加する==
+
#グローバルヘッダー/右上の個人設定/bitbucket_setting/sshキー/鍵を追加
+
#接続元pcの公開鍵の文字列を"キー"部分に入れる
+
vi ~/.ssh/id_rsa.pub
+
 
+
==接続テスト==
+
$ ssh -T git@bitbucket.org
+
logged in as [ユーザ名]
+
You can use git or hg to connect to Bitbucket. Shell access is disabled.
+
# 上記2行が出れば接続されている
+
 
+
==プロジェクト作成とpush==
+
cd project1
+
git init
+
git remote add origin ssh://git@bitbucket.org/[ユーザ名]/project1.git
+
git add readme.txt
+
git commit -m "first commit"
+
git push origin master
+
 
+
==他のgitからbitbucketにmasterを切り替える==
+
cd project1
+
git remote remove origin
+
git remote add origin ssh://git@bitbucket.org/[ユーザ名]/project1.git
+
git pull origin master
+
git push origin master
+
 
+
==参考==
+
http://www.task-notes.com/entry/20150210/1423537200
+

2022年11月23日 (水) 21:37時点における最新版

git/bitbucket/基本

git/bitbucket/プルリク