Git 確認系コマンド

GitGitHub

目次一覧

 状態:結論(後で見返す用)  閲覧数:1,933  投稿日:2019-06-22  更新日:2020-06-01
$ pwd / $ git remote /$ git config

$ git log / $ git status / $ git branch

$ pwd / $ git remote /$ git config

 閲覧数:481 投稿日:2019-06-22 更新日:2019-06-23

$ pwd


$ pwd
/L/1_Hp/0_sakura/2018server/var/Www/html/1-p46


$ git remote


リモートリポジトリの設定内容を一覧表示(オプションなし)
$ git remote
origin


リモートリポジトリの設定内容を一覧表示(URLも表示)
$ git remote -v
origin  git@github.com:GitHubユーザー名/GitHubリポジトリ名.git (fetch)
origin  git@github.com:GitHubユーザー名/GitHubリポジトリ名.git (push)


$ git remote get-url origin
git@github.com:GitHubユーザー名/GitHubリポジトリ名.git


$ git config


config情報を表示する
$ git config --list
core.symlinks=false
core.autocrlf=false
core.fscache=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
help.format=html
rebase.autosquash=true
http.sslcainfo=L:/9.soft/Git/mingw64/ssl/certs/ca-bundle.crt
http.sslbackend=openssl
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
credential.helper=manager
core.longpaths=true
user.name=e1blue
user.email=GitHubメールアドレス
core.autocrlf=false
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
remote.origin.url=git@github.com:GitHubユーザー名/GitHubリポジトリ名.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master


$ git config remote.origin.url
$ git config remote.origin.url
git@github.com:GitHubユーザー名/GitHubリポジトリ名.git



git remote get-url origin と git config remote.origin.url について

$ git log / $ git status / $ git branch

 閲覧数:464 投稿日:2019-06-22 更新日:2022-09-19

$ git log


コミット履歴を表示する
・上に表示されるものほど新しいコミット履歴となる
・オプションなし。全てのコミット履歴一覧を表示する
$ git log
commit xxxx (HEAD -> master, origin/master)
Author: GitHubユーザー名 <GitHubメールアドレス>
Date:   Fri Jun 21 14:10:44 2019 +0900

   first commit

commit xxxx
Author: GitHubユーザー名 <GitHubユーザー名@users.noreply.github.com>
Date:   Fri Jun 21 11:47:47 2019 +0900

   Initial commit


main ブランチのコミットログを確認
$ git switch main
$ git log --oneline

$ git status


Gitの状態
前回commitからの差分表示

リポジトリがない場所で実行
$ git status
fatal: not a git repository (or any of the parent directories): .git


リポジトリがある場所で実行
$ cd /L
$ cd 1_Hp/0_sakura/2018server/var/Www/html/1-p46
$ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean


$ git branch


ブランチを表示
現在のブランチ(=自分が今編集しているブランチ)を表示する
$ git branch
* master


リモートも含めた現在のブランチを表示
*印が現在のブランチ
$ git branch -a
* master
 remotes/origin/master



Git BASH 経由で、Windows10 から GitHub へ PUSH する

Windows10で使用できるGitクライアント



週間人気ページランキング / 11-15 → 11-21
順位 ページタイトル抜粋 アクセス数
1 開発 0 4
2 Twitter連携ログイン代替APIを探しています | Webサービス開発 1
2 Twitter API (Twitter) カテゴリー 1
2 Create New App / アプリケーション登録 1
2 個人事業主が導入可能な決済系サービス2次選考過程第1段階 | 決済(Webサービスビジネス) 1
2 コインチェック株式会社   | Webサービスビジネス 1
2 Q1.「Twitter API」は必ずユーザ認証させる必要がある? 自分のデータを取得する場合はユーザ認証画面へ遷移させる必要はない? 1
2 電話番号認証を新規で行う(SMSメールを受信する)度に、(以前の該当アカウントでは)下記メールを受け取る 1
2 RSS購読解除履歴 | RSS(プログラミング) 1
2 大前提 / これまで / 自分で作成することを決意 1
2 Twitter API 1.0 | Twitter API 旧仕様(Twitter) 1
2 何やってたか履歴 | プログラミング 1
2 「Twitter Developers」でアプリケーションを新規作成するためには? SMS認証用コードを確認可能な電話番号の登録が必要 | Twitter Developer(Twitter) 1
2 GitHubリモートリポジトリ名には日本語を使用できない。使用すると、ハイフンへ自動置換されてしまう | GitHub(Git) 1
2 アクセス数が少ない Webサイト(開発ブログ) を非公開へ変更 | Webサービス開発 1
2 気になるアプリ | ブックマーク 1
2 mhtmlの問題 | Google Chrome 拡張機能 1
2 Twitterデータ 対応 第1版 / 第1版 更新 1
2 Q2.About multiple applications 1
2 ソフトウェア カテゴリー 1
2025/11/22 1:02 更新