[過去ログ] Git 18 (1002レス)
前次1-
抽出解除 レス栞

このスレッドは過去ログ倉庫に格納されています。
次スレ検索 歴削→次スレ 栞削→次スレ 過去ログメニュー
909
(6): デフォルトの名無しさん (ワッチョイ 09e4-chQ5) [sage] 2022/11/05(土) 21:15:14.62 ID:zDjINlW+0(9/26) AAS
>>906
そのリポジトリがどういう構造になっているかわけわからん
git show-branch してみろ
910: デフォルトの名無しさん (ワッチョイ 617b-8+ss) [sage] 2022/11/05(土) 21:26:43.61 ID:646uiMLL0(23/38) AAS
>>909
すまぬ、確かに今見てればちょっとおかしい。
もう一度作るから30分ほどお待ちを。
911
(1): デフォルトの名無しさん (ワッチョイ 617b-8+ss) [sage] 2022/11/05(土) 21:51:56.84 ID:646uiMLL0(24/38) AAS
>>909
結果
$ git show-branch
! [develop] impl5
* [master] impl5
--
+* [develop] impl5

$ git branch
develop
* master
912
(2): デフォルトの名無しさん (ワッチョイ 617b-8+ss) [sage] 2022/11/05(土) 21:52:24.93 ID:646uiMLL0(25/38) AAS
>>909

$ git diff HEAD~1
diff --git a/test.txt b/test.txt
index 3585d98..bbddc42 100644
--- a/test.txt
+++ b/test.txt
@@ -4,3 +4,4 @@ impl1
impl2
impl3
impl4
+impl5

$ git diff @{1}
diff --git a/test.txt b/test.txt
index e79c5e8..bbddc42 100644
--- a/test.txt
+++ b/test.txt
@@ -1 +1,7 @@
initial
+impl0
+impl1
+impl2
+impl3
+impl4
+impl5
913
(1): デフォルトの名無しさん (ワッチョイ 617b-8+ss) [sage] 2022/11/05(土) 21:53:21.88 ID:646uiMLL0(26/38) AAS
>>909
再現コード

#!/bin/bash -x
#

git init
echo 'initial' > test.txt
git add test.txt
git commit -m 'initial'
git branch develop

for (( i=0 ; i<6 ; i++ ));
do
git branch feature$i
git switch feature$i
echo "impl"$i >> test.txt
git add test.txt
git commit -m "impl"$i
git switch develop
git merge feature$i
git branch -d feature$i
done

git switch master
git merge develop
914
(2): デフォルトの名無しさん (ワッチョイ 617b-8+ss) [sage] 2022/11/05(土) 22:01:15.70 ID:646uiMLL0(27/38) AAS
>>909
ちなreflog

$ git reflog
1a804d9 (HEAD -> master, develop) HEAD@{0}: merge develop: Fast-forward
b0325fc HEAD@{1}: checkout: moving from develop to master
1a804d9 (HEAD -> master, develop) HEAD@{2}: merge feature5: Fast-forward
ba4e962 HEAD@{3}: checkout: moving from feature5 to develop
1a804d9 (HEAD -> master, develop) HEAD@{4}: commit: impl5
ba4e962 HEAD@{5}: checkout: moving from develop to feature5
ba4e962 HEAD@{6}: merge feature4: Fast-forward
a32e11d HEAD@{7}: checkout: moving from feature4 to develop
ba4e962 HEAD@{8}: commit: impl4
a32e11d HEAD@{9}: checkout: moving from develop to feature4
a32e11d HEAD@{10}: merge feature3: Fast-forward
8d9924f HEAD@{11}: checkout: moving from feature3 to develop
a32e11d HEAD@{12}: commit: impl3
8d9924f HEAD@{13}: checkout: moving from develop to feature3
8d9924f HEAD@{14}: merge feature2: Fast-forward
0f78740 HEAD@{15}: checkout: moving from feature2 to develop
8d9924f HEAD@{16}: commit: impl2
0f78740 HEAD@{17}: checkout: moving from develop to feature2
0f78740 HEAD@{18}: merge feature1: Fast-forward
47792a3 HEAD@{19}: checkout: moving from feature1 to develop
0f78740 HEAD@{20}: commit: impl1
47792a3 HEAD@{21}: checkout: moving from develop to feature1
47792a3 HEAD@{22}: merge feature0: Fast-forward
b0325fc HEAD@{23}: checkout: moving from feature0 to develop
47792a3 HEAD@{24}: commit: impl0
b0325fc HEAD@{25}: checkout: moving from master to feature0
b0325fc HEAD@{26}: commit (initial): initial
915
(1): デフォルトの名無しさん (ワッチョイ 617b-8+ss) [sage] 2022/11/05(土) 22:02:09.13 ID:646uiMLL0(28/38) AAS
>>909
ついでに一応、終了時のtest.txt

$ cat test.txt
initial
impl0
impl1
impl2
impl3
impl4
impl5
前次1-
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ AAサムネイル

ぬこの手 ぬこTOP 0.039s