ここで私の無知をお許しください... これが背景です: テストスクリプトを整理するために TestScritps ディレクトリを作成しました。3 つのスクリプトを から に移動し<root dir>
ました<root dir>/TestScripts
。一度に 1 つずつ移動し、それぞれの後にローカル コミットを実行しました。次に、すべての変更をプッシュしました。
私は別のマシンに行き、プルを実行しました:
$ cd cryptopp/
$ git pull
remote: Counting objects: 25, done.
remote: Compressing objects: 100% (24/24), done.
remote: Total 25 (delta 11), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (25/25), done.
From https://github.com/weidai11/cryptopp
2ac9ea1..2a22a84 master -> origin/master
Updating 2ac9ea1..2a22a84
Fast-forward
TestScripts/cryptest-android.sh | 44 +
TestScripts/cryptest-ios.sh | 40 +
TestScripts/cryptest.sh | 5729 +++++++++++++++++++++++++++++++++++++++
rijndael.cpp | 2 +-
setenv-android.sh | 85 +-
5 files changed, 5870 insertions(+), 30 deletions(-)
create mode 100755 TestScripts/cryptest-android.sh
create mode 100755 TestScripts/cryptest-ios.sh
create mode 100755 TestScripts/cryptest.sh
$ ls *.sh
cryptest-android.sh cryptest.sh setenv-android.sh setenv-ios.sh
cryptest-ios.sh rdrand-nasm.sh setenv-embedded.sh
ファイルがコピーされただけであることに注意してください。彼らは動かされませんでした。
git-mv
man ページを確認しましたが、誤った動作については議論されていないようです。
2 つの質問があります。git mv
ファイルをコピーするだけで、移動しないのはなぜですか? どうすればgit mv
「通常」に実行できますか? ここで「通常」とは、コマンド ラインを使用したほぼすべての人が期待することを意味します。つまり、ファイルを から<target location>
に移動します<destination location>
。
関連するコマンド履歴は次のとおりです。
994 rm -rf cryptopp/
995 git clone https://github.com/weidai11/cryptopp
996 cd cryptopp/
997 mkdir TestScripts
998 git mv cryptest.sh TestScripts/
999 ls *.sh
1000 git commit TestScripts/cryptest.sh -m "Organize test scripts (Issue 303)"
1001 ls *.sh
1002 git mv cryptest-ios.sh TestScripts/
1003 git commit TestScripts/cryptest-ios.sh -m "Organize test scripts (Issue 303)"
1004 ls *.sh
1005 git commit