Git 確認系コマンド

GitGitHub

目次一覧

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

$ git log / $ git status / $ git branch

$ pwd / $ git remote /$ git config

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

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



週間人気ページランキング / 6-20 → 6-26
順位 ページタイトル抜粋 アクセス数
1 Twitter API v1.1 | Twitter Developer(Twitter) 2
1 「Twitterデータ」対応 | Twitter Developer(Twitter) 2
1 Webサービス | ブックマーク 2
1 Git BASH 作業履歴 2022/10/20 / P48 site-rank(First-Ranking-Service) 2 / P25をP48のリポジトリへ反映させていたので、「git push -f origin main」で強制上書き実行 | Git BASH(Git) 2
2 課金決済代行サービスを分類 | Webサービスビジネス 1
2 Twitter アカウント管理 | Twitter Developer(Twitter) 1
2 ANRIとは? / ジェネラルパートナー株式会社 1
2 fatal: remote error: is not a valid repository name | Git BASH(Git) 1
2 「Twitter Developers」でアプリケーションを新規作成するためには? SMS認証用コードを確認可能な電話番号の登録が必要 | Twitter Developer(Twitter) 1
2 GitHubリモートリポジトリ名には日本語を使用できない。使用すると、ハイフンへ自動置換されてしまう | GitHub(Git) 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
2 既存Twitterアカウントより電話番号を削除すると、どうなるの? 新規アプリ作成する際、再度電話番号を使用したSMS認証が必要になる | Twitter Developer(Twitter) 1
2 Webサイト終了プライベート手順 | Webサービス開発 1
2 「Windows10」へ「gitfor windows VERSION 2.22.0」をインストール | GitHub(Git) 1
2 Twitter API 1.0 | Twitter API 旧仕様(Twitter) 1
2 GitHub(Git) カテゴリー 1
2 コインチェック株式会社   | Webサービスビジネス 1
2 Windows10で使用できるGitクライアント | GitHub(Git) 1
2 Git BASH(Git) カテゴリー 1
2025/6/27 1:02 更新