Git 確認系コマンド

GitGitHub

目次一覧

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

$ git log / $ git status / $ git branch

$ pwd / $ git remote /$ git config

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

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



週間人気ページランキング / 7-21 → 7-27
順位 ページタイトル抜粋 アクセス数
1 fatal: remote error: is not a valid repository name | Git BASH(Git) 2
2 Windows10で使用できるGitクライアント | GitHub(Git) 1
2 「Windows10」へ「gitfor windows VERSION 2.18.0」をインストール | GitHub(Git) 1
2 同じ携帯電話番号でも、複数の「Twitter Developers」アカウントを作成可能 | Twitter Developer(Twitter) 1
2 「Windows10」へ「gitfor windows VERSION 2.22.0」をインストール | GitHub(Git) 1
2 ブックマーク カテゴリー 1
2 teratailでは質問しない | プログラミング 1
2 2次選考結果全体 / 順位 / 感想 1
2 フォルダ/ファイル構成 | プログラミング 1
2 本 | ブックマーク 1
2 You currently have access to a subset of Twitter API v2 endpoints | Twitter API (Twitter) 1
2 Git BASH 経由で、Windows10 から GitHub へ PUSH する | GitHub(Git) 1
2 「Twitter Developers」でアプリケーションを新規作成するためには? SMS認証用コードを確認可能な電話番号の登録が必要 | Twitter Developer(Twitter) 1
2 Fintechの中で興味がある内容を自分の言葉でまとめていくための目次 | 決済(Webサービスビジネス) 1
2 Twitter 電話番号の問題 | Twitter Developer(Twitter) 1
2 Twitter API v1.1 | Twitter Developer(Twitter) 1
2 (私の)日本語コーディングルール | 言葉(Webサービス開発) 1
2 API(プログラミング) カテゴリー 1
2 GitHubリモートリポジトリ名には日本語を使用できない。使用すると、ハイフンへ自動置換されてしまう | GitHub(Git) 1
2 Twitter アカウント管理 | Twitter Developer(Twitter) 1
2025/7/28 1:02 更新