日記帳
本ページはプロモーションが含まれています
カテゴリー
Links
blog(ブログ)マスター
アンドロイドの巣
ゼロから始めるベランダ菜園
タイトル
ラジコン
2024年4月
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

タイトル

執筆:2024.04.12
編集:2024.04.12




手順

(1) コマンドプロンプトを起動します

(2) 重要: コードページのデフォルトがシフトジスなのでをUTF8に変更します。

(3) git bashを呼び出します。

バッチファイルの場合は、utf8でファイルを保存します。

@rem CODE PAGE UTF-8
chcp 65001

"C:\Program Files\Git\bin\bash.exe" --login -i -c "bash内の実行したいunixコマンド"


用途例

タスク(cron) と組み合わせるとリポジトリの自動更新ができます
バッチファイルに入れておいたほうが、マシンを変更したときや修正したいときに便利です。

1行にするには、 && でつなげます。

最初からフォルダ移動していたほうがいいかもですね.

chcp 65001 && chdir "パス" && "C:\Program Files\Git\bin\bash.exe" --login -i -c "bash内の実行したいunixコマンド"



-c
If the -c option is present, then commands are read from the first non-option argument command_string. If there are arguments after the command_string, the first argument is assigned to $0 and any remaining arguments are assigned to the positional parameters. The assignment to $0 sets the name of the shell, which is used in warning and error messages.


-i 対話的

If the -i option is present, the shell is interactive.

2024.04.12

タイトル

執筆:2024.04.08
編集:2024.04.08


forgejo/gitea

アーカイブのルートフォルダ名

デフォルト(規定値): ブランチ名、タグ名


gitコマンドの --prefix に相当する機能ですね
コマンドで圧縮すれば簡単に実現できます。

git archive --prefix=ルートフォルダ名


変更するには、

» 続きを読む

2024.04.08

タイトル

執筆:2023.12.28
編集:2023.12.28


セルフ証明書でエラー

$ git push origin --mirror
fatal: unable to access https:// : SSL certificate problem: self signed certificate

無視設定にする

$ git config --local http.sslVerify false

$ git push origin --mirror
2023.12.28

gitの2038年問題

32bit環境下でgitには、2038年問題が存在するようです


TortoiseGit
日時: 2038/01/19 12:14:07

シェルの場合
Date: Thu Jan 1 00:00:00 1970 +0000

になってしまうようです。

gitは 内部で、unix timeで保存されているのでしょうか?

なんと 2038/01/19 12:14:07 を超える日付は扱えないようです

16ビットOSが消えたように
あと15-20年後には32ビットOSは消滅していると思いますので心配しないで大丈夫です!!


2017.02.04

git rebase --onto 新しい親 比較元 新しい子

There is no tracking information for the current branch.
Please specify which branch you want to rebase against.
See git-rebase(1) for details


コマンドに全角スペースが入っているとこのメッセージが出ます

コマンドラインに全角スペースが区切りとして混入していないか確認しましょう
2016.05.23



PR

[PR]