Quantcast
Channel: Bashタグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 2813

Gitコマンド一覧

$
0
0
セットアップ git init ・ディレクトリ下で使用する。 ユーザー名とメールアドレスを確認&再設定 $ git config user.name $ git config user.email $ git config --global user.name "Your Name" $ git config --global user.email "your.mail.account@gmail.com" ・--globalオプションは、ユーザごとの設定を行う ~/.gitconfig ファイルに対して、サーバー全体に値を設定するという意味 ・--localにすると、ディレクトリ下限定の設定となる。 ステージ、コミット、プッシュ $ git add sample.php $ git add -A $ git commit -m "commit message" $ git remote add origin https://github.com/user/repository.git $ git push -u origin branchname ・pushは、ブランチごとに2回目以降は「git push」のみでOK ブランチの編集 $ git checkout -b <branch> # チェックアウトし、ブランチを新規作成 $ git branch --merged # マージ済みブランチの一覧 $ git branch -d # マージ済みブランチの削除 $ git branch -D <branch> # 強制的なブランチの削除 $ git fetch -p # リモートブランチの最新状態を取得(リモートブランチの削除も同期) $ git for-each-ref refs/remotes --merged # マージ済みリモートブランチの一覧 $ git push --delete # リモートブランチの削除 プル $ git pull origin master $ git pull アクセストークン設定 参考URL https://qiita.com/shiro01/items/e886aa1e4beb404f9038 ・アクセストークンとは? →パスワードを暗号化したもの。passwordを聞かれたとき、普通に読める文字列の代わりに入力する。 Settings → Developer settings → Personal access tokens 参考URL https://qiita.com/2m1tsu3/items/6d49374230afab251337 https://qiita.com/Toshimatu/items/f71a935612a55d6e674e

Viewing all articles
Browse latest Browse all 2813

Trending Articles