20220115のGitに関する記事は2件です。

Git ローカルの作業コピーを他のブランチと比較するコマンド(メモ)

test-branchというブランチで作業していて、その中のtest.txtをmasterのtest.txtと比較する、という場合 git diff master -- test.txt git difftool master -- test.txt 作業コピーではなく、ブランチ間の最新のコミット同士を比較する場合 git diff master..test-branch -- test.txt git difftool master..test-branch -- test.txt git difftoolで起動するdiffツールの設定 WinMergeの場合は git config --global diff.tool winmerge
  • このエントリーをはてなブックマークに追加
  • Qiitaで続きを読む

windows git bash ssh接続

はじめ リモートとやりとりするときにパスワード入力は面倒なのでssh通信しようと思ったとき皆もよく忘れる例の手順を適当に書く てじゅん git bash起動 .sshディレクトリを作成 $ mkdir .ssh id_githubという鍵を生成 $ ssh-keygen -t id_github -C "your_emai@example.com" SSHエージェントが起動してるか確認 $ eval "$(ssh-agent -s)" 起動してたら、SSHエージェントに登録 $ ssh-add id_github 公開キーをコピー $ clip < ~/.ssh/id_github.pub GithubのSettings/SSH and GPG keysのAdd SSH keyをクリックして、コピーした公開キーを登録 登録がうまくいっていれば成功メッセージが返ってくる $ ssh -T git@github.com Hi youname! ... successfully ... access. .sshフォルダのconfigファイルを作成 $ vim ~/.ssh/config ここにはssh通信するときに設定ファイルの参照場所を書く Host github HostName github.com IdentityFile ~/.ssh/id_github User git git pushしてうまくいくか試す $ git push
  • このエントリーをはてなブックマークに追加
  • Qiitaで続きを読む