1. 症状
git remote add コマンドを実行するとエラーとなる。
|
1 2 |
$ git remote add origin https://JaneDoe@dev.azure.com/JaneDoe/MyRepository/_git/MyRepository fatal: remote origin already exists. |
git remote add コマンドを実行するとエラーとなる。
|
1 2 |
$ git remote add origin https://JaneDoe@dev.azure.com/JaneDoe/MyRepository/_git/MyRepository fatal: remote origin already exists. |
Windows形式の改行コード (CR+LF) の表示 ^M を抑止する方法
下記の例のように行末の ^M が目障りである。
|
1 2 |
-// Created on: 2019/01/26 9:22:59 +// Created on: 2019/01/26 10:04:07^M |
^M == CR == 0x0A
|
1 |
$ git config --local core.whitespace cr-at-eol |
|
1 |
$ git config --local --unset core.whitespace |
robocar store から購入したSD cardにインストールされているOSイメージ
d2.localpiasdfasdf|
1 |
$ ssh pi@d2.local |
|
1 2 3 4 5 6 |
$ lsb_release -a No LSB modules are available. Distributor ID: Raspbian Description: Raspbian GNU/Linux 8.0 (jessie) Release: 8.0 Codename: jessie |
プログラミング言語 C++ における演算子オーバーロードの糖衣構文的な解釈と、フレンド関数による解決
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
#include <iostream> using namespace std; class coord { int x, y; public: coord() : x(0), y(0) {} coord(int i, int j) : x(i), y(j) {} void show() { cout << "x = " << x << ", y = " << y << endl; } coord operator+(coord position); coord add(coord position); }; coord coord::operator+(coord position) { coord temp; temp.x = this->x + position.x; temp.y = this->y + position.y; return temp; } coord coord::add(coord position) { coord temp; temp.x = this->x + position.x; temp.y = this->y + position.y; return temp; } int main() { coord position_a(10, 10), position_b(5, 3); coord position_m = position_a + position_b; position_m.show(); // => x = 15, y = 13 coord position_n = position_a.add(position_b); position_n.show(); // => x = 15, y = 13 return 0; } |
※ 説明をシンプルにするために参照渡しやconst修飾は省略しています。
ワークツリーからファイルエクスプローラやrmコマンドで削除した複数のファイルをgitの追跡対象からも一括して削除する方法
|
1 |
$ git rm `git ls-files --deleted` |
上記コマンドでファイル削除操作がステージング(インデックス)に登録される。
ステージングの結果がOKであれば git commit を実行する。
Robocar Store から購入した "Donkey Car Starter Kit" の DC/DCコンバータ(電源ボード)の操作スイッチとLEDの説明です。

Robocar Store から購入した "Donkey Car Starter Kit" のベースプレート(Raspberry Piなどの電子基板を車体に固定するアクリル板)をラジコンカーの車体に固定する方法
開封直後。ラジコンカーのオリジナルのボディーが車体に載った状態です。
ボディーの前後4箇所を金属ピンで簡単に止めているだけです。
linuxで xxx.tar.gz を展開すると「未知の拡張ヘッダキーワード」エラーが大量に出力される。
|
1 2 3 4 |
tdiary-v5.0.10/benchmark/benchmark_io_default.rb tar: 未知の拡張ヘッダキーワード `SCHILY.dev' を無視 tar: 未知の拡張ヘッダキーワード `SCHILY.ino' を無視 tar: 未知の拡張ヘッダキーワード `SCHILY.nlink' を無視 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
E325: 注意 次の名前でスワップファイルを見つけました "C:/Users/Jane/Projects/MyApp/.git/.COMMIT_EDITMSG.swp" 所有者: Jane 日付: Thu Dec 13 21:58:49 2018 ファイル名: ~Jane/Projects/MyApp/.git/COMMIT_EDITMSG 変更状態: あり ユーザー名: Jane ホスト名: MyHost プロセスID: 2964 (まだ実行中) 次のファイルを開いている最中 "C:/Users/Jane/Projects/MyApp/.git/COMM IT_EDITMSG" 日付: Thu Dec 13 21:58:48 2018 (1) 別のプログラムが同じファイルを編集しているかもしれません. この場合には、変更をしてしまうと1つのファイルに対して異なる2つの インスタンスができてしまうので、そうしないように気をつけてください. 終了するか、注意しながら続けてください. (2) このファイルの編集セッションがクラッシュした. この場合には ":recover" か "vim -r C:/Users/Jane/Projects/MyApp/ .git/COMMIT_EDITMSG" を使用して変更をリカバーします(":help recovery" を参照). 既にこれを行なったのならば、スワップファイル "C:/Users/Jane/Projects/MyApp/.git/.COMMIT_EDITMSG.swp" を消せばこのメッセージを回避できます. |
.git/COMMIT_EDITMSG.swpを削除する