שגיאה בגיט
תכנות
8
פוסטים
2
כותבים
113
צפיות
1
עוקבים
-
אני מנסה לעשות PULL מתקיה אחרת ואני מקבל את השגיאה הבאה
[root@li1950-22 main]# git pull remote: Counting objects: 7, done. remote: Compressing objects: 100% (4/4), done. remote: Total 4 (delta 3), reused 0 (delta 0) Unpacking objects: 100% (4/4), done. From /root/main/../test 65acba3..0ab80ed master -> origin/master Updating 65acba3..0ab80ed error: Your local changes to the following files would be overwritten by merge: tcp.go Please, commit your changes or stash them before you can merge. Aborting
מה זה אומר?
-
אני מנסה לעשות PULL מתקיה אחרת ואני מקבל את השגיאה הבאה
[root@li1950-22 main]# git pull remote: Counting objects: 7, done. remote: Compressing objects: 100% (4/4), done. remote: Total 4 (delta 3), reused 0 (delta 0) Unpacking objects: 100% (4/4), done. From /root/main/../test 65acba3..0ab80ed master -> origin/master Updating 65acba3..0ab80ed error: Your local changes to the following files would be overwritten by merge: tcp.go Please, commit your changes or stash them before you can merge. Aborting
מה זה אומר?
-
@nigun
pull עושה fetch + merge. גיט לא מסכים לעשות מרג' כי זה ידרוס שינויים שלא נשמרו בקומיט (או ב-stash). -
@yossiz
תגיד אם הבנתי נכון
אם אני לא מעוניין לשמור את השנויים המקומיים לעשות קומיט
ואם אני מעוניין לשמור אז סטאש? -
@nigun אם אתה לא מעוניין לשמור את השינויים המקומיים? אז תעיף אותם, אל תעשה לא קומיט ולא סטאש.
אם אתה מעוניין לעשות קומיט לשינויים המקומיים לפני שאתה משלב את השינויים המרוחקים תעשה קומיט אם לא תעשה סטאש.