Git 確認系コマンド

GitGitHub

目次一覧

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

$ git log / $ git status / $ git branch

$ pwd / $ git remote /$ git config

 閲覧数:442 投稿日: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

 閲覧数:423 投稿日: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クライアント



週間人気ページランキング / 8-10 → 8-16
順位 ページタイトル抜粋 アクセス数
1 Twitter API 1.0 | Twitter API 旧仕様(Twitter) 2
2 同じ携帯電話番号でも、複数の「Twitter Developers」アカウントを作成可能 | Twitter Developer(Twitter) 1
2 Windows10で使用できるGitクライアント | GitHub(Git) 1
2 RSS(プログラミング) カテゴリー 1
2 Twitter API | Twitter API (Twitter) 1
2 mhtmlの問題 | Google Chrome 拡張機能 1
2 Twitter 複数アカウントでPOSTしたい | Twitter Developer(Twitter) 1
2 課金決済代行サービスを分類 | Webサービスビジネス 1
2 Twitter API 仕様 | Twitter Developer(Twitter) 1
2 Git 用語の基礎 | Git BASH(Git) 1
2 「インターネット計測とデータ解析 2010」視聴メモ | SFC(プログラミング) 1
2 Webサービスビジネス カテゴリー 1
2 「Twitterデータ」対応 | Twitter Developer(Twitter) 1
2 GitHubリモートリポジトリ名には日本語を使用できない。使用すると、ハイフンへ自動置換されてしまう | GitHub(Git) 1
2 RTだけ表示するやつ / 2020/3/20時点の結論 / Link 1
2 スポーツ 1
2 「User is not Authorized」と「Phone number is already in use for too many accounts and cannot be added to another user.」は連動していない | Twitter Developer(Twitter) 1
2 これまで / これから / 案1.Web広告の問題点 1
2 「Windows10」へ「gitfor windows VERSION 2.22.0」をインストール | GitHub(Git) 1
2 技術書籍 | プログラミング 1
2025/8/17 1:02 更新