私はgitで2つのローカルブランチを操作していました。それらをalerts_v2と呼びましょう。Aにいくつかの変更を加え、コミットしてからBに切り替えました。Bでいくつかの作業を行い、ブランチAに切り替えた後、リモートブランチからのファイルの変更をローカルの変更と混ぜ合わせました。したがって、gitステータスを実行すると、変更しなかったファイルが多数リストされます。私の目標は、コミットされた変更に関してブランチをリモートマスターと一致させ、「gitstatus」を実行したときにのみローカルの変更を表示することです。
更新:reflogのコピーを貼り付けました。ブランチalerts_v2は、上記の例のブランチAに対応します。私は実際にalerts_v2に戻る前にいくつかのブランチで作業したので、ブランチBは実際にはいくつかのブランチを表しています(ただし、これは重要ではないと思います)。
エントリ23a03b7はalerts_v2から離れた場所であり、エントリf6c143eは戻った場所です。
31b259f HEAD@{1}: origin/master: updating HEAD
74aab0b HEAD@{2}: commit: Blap
31b259f HEAD@{3}: origin/master: updating HEAD
f6c143e HEAD@{4}: checkout: moving from version to alerts_v2
31b259f HEAD@{5}: commit: Added version information popup
b2c9ce3 HEAD@{6}: origin/master: updating HEAD
f0c9b0c HEAD@{7}: commit: Blap
b2c9ce3 HEAD@{8}: origin/master: updating HEAD
abba6bc HEAD@{9}: commit: Blap
b2c9ce3 HEAD@{10}: origin/master: updating HEAD
34ecadc HEAD@{11}: commit: Blap
f3cb5f9 HEAD@{12}: commit: Blap
b2c9ce3 HEAD@{13}: origin/master: updating HEAD
3a8c25d HEAD@{14}: commit: Blap
b2c9ce3 HEAD@{15}: origin/master: updating HEAD
6820bd3 HEAD@{16}: pull : Merge made by recursive.
ad215b1 HEAD@{17}: commit: Blap
27bd651 HEAD@{18}: commit: Blap
e74af44 HEAD@{19}: checkout: moving from e74af44ae40484d837e0295c1622731de1dcb84e to version
e74af44 HEAD@{20}: pull : Fast-forward
76bb1fa HEAD@{21}: checkout: moving from ncli to master2
e74af44 HEAD@{22}: commit: Added download NCLI button
ed2d3c4 HEAD@{23}: origin/master: updating HEAD
9ad842a HEAD@{24}: pull : Merge made by recursive.
b99d663 HEAD@{25}: commit: Added download ncli button
e83d923 HEAD@{26}: origin/master: updating HEAD
719791a HEAD@{27}: commit: Added download NCLI button
9e613d1 HEAD@{28}: commit: Added download ncli button
e83d923 HEAD@{29}: origin/master: updating HEAD
a4d6d42 HEAD@{30}: pull : Merge made by recursive.
39f5fed HEAD@{31}: commit: Add NCLI download capability
76bb1fa HEAD@{32}: checkout: moving from 76bb1fa890089ca732322eba7ad9e74486e2bda1 to ncli
76bb1fa HEAD@{33}: checkout: moving from master to master2
9248d50 HEAD@{34}: commit: Blap
76bb1fa HEAD@{35}: origin/master: updating HEAD
23a03b7 HEAD@{36}: checkout: moving from alerts_v2 to master
f6c143e HEAD@{37}: commit: Blap
8a4b166 HEAD@{38}: commit: Blap
76bb1fa HEAD@{39}: pull : Fast-forward
d245574 HEAD@{40}: pull : Fast-forward
c1e5e92 HEAD@{41}: pull : Fast-forward
b8602a5 HEAD@{42}: commit: Changed Alert event handling
db06232 HEAD@{43}: origin/master: updating HEAD
e807ef7 HEAD@{44}: rebase: Commit
db06232 HEAD@{45}: checkout: moving from alerts_v2 to db06232a413d79fd5607c5618dce8a316efbe84
8cc089f HEAD@{46}: pull : Merge made by recursive.
c74acd9 HEAD@{47}: commit: Commit
4a0c135 HEAD@{48}: commit: Changed the name attribute in the AlertModel to map to Alert Type
ed087cd HEAD@{49}: origin/master: updating HEAD
3db4639 HEAD@{50}: commit: Changed the name attribute in the AlertModel to map to Alert Type
ed087cd HEAD@{51}: origin/master: updating HEAD
ecaea02 HEAD@{52}: commit: Changed the name attribute in the AlertModel to map to Alert Type
ed087cd HEAD@{53}: origin/master: updating HEAD
36323fa HEAD@{54}: pull : Merge made by recursive.
18034e5 HEAD@{55}: commit: Changed AlertMode name attribute to map to Alert Type
a46de98 HEAD@{56}: origin/master: updating HEAD
6fae22b HEAD@{57}: checkout: moving from alerts_patch1 to alerts_v2
8efde4b HEAD@{58}: checkout: moving from alerts_v2 to alerts_patch1
6fae22b HEAD@{59}: commit: Made some changes
a46de98 HEAD@{60}: checkout: moving from a46de98c050cfc8b61b5efccb20d0a271b3959d2 to alerts_v
a46de98 HEAD@{61}: checkout: moving from a46de98c050cfc8b61b5efccb20d0a271b3959d2 to events1
a46de98 HEAD@{62}: commit: Initial implementation of Alert Manager, Namespace Manager and Pol
5cfb8a2 HEAD@{63}: origin/master: updating HEAD
f978dae HEAD@{64}: commit: Initial implementation of Alert Manager, Namespace Manager and Pol
5cfb8a2 HEAD@{65}: origin/master: updating HEAD