忘れるgitの備忘録
自分用です。
git clone
git clone https:xxx.xxx
sshでcloneするとき
git clone [ssh configの接続名]:xxx/xxx
#branch 指定
git clone -b [ブランチ名][リポジトリのアドレス]
接続
# remoteリポジトリの確認
git remote -v
# remoteリポジトリ削除
git remote rm origin http://xxxxxx.xxx/xxxx
#remoteリポジトリの追加
git remote add origin http://xxxxxx.xxx/xxxx
branch系
# branchの作成
git branch [branch名]
# branchの移動
git checkout [branch名]
# branchの削除
git branch -d [branch名]
add commit push
# ステージング
git add .
# commit
git commit -m "コメント"
# push
git push