Cześć chciałem nauczyć się praktycznie używać Gita, więc znalazłem sobie fajną stronkę z zadaniami.
Siedzę aktualnie nad zadaniem 5
https://gitexercises.fracz.com/exercise/merge-conflict
(banalne XD) ale utknąłem XD.
Czy ktoś mógłby mi pomóc bo nie wiem co zle robię. Poniżej opiszę krok po kroku mój tok postępowania i jaki niesie efekt. Może komuś się rzuci w oczy błąd ;)
A więc jestem aktualnie w katalogu:
/d/Desktop/git_exercise/exercises
1. Odpalam zadanie:
git start merge-conflict
2. git status
On branch merge-conflict
Your branch is ahead of 'origin/merge-conflict' by 2 commits.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
3. $ git merge fast-bugfix
Auto-merging file.txt
CONFLICT (content): Merge conflict in file.txt
Automatic merge failed; fix conflicts and then commit the result.
4. git status
On branch merge-conflict
Your branch is ahead of 'origin/merge-conflict' by 2 commits.
(use "git push" to publish your local commits)
You have unmerged paths.
(fix conflicts and run "git commit")
(use "git merge --abort" to abort the merge)
Unmerged paths:
(use "git add <file>..." to mark resolution)
both modified: file.txt
no changes added to commit (use "git add" and/or "git commit -a")
5. Tak wygląda plik file.txt
<<<<<<< HEAD
Hello mundo
=======
Hola world
>>>>>>> fast-bugfix
6. Po moich zmianach zostaje tylko:
Hello mundo
7. zapisuje plik file.txt
8. git add file.txt
9. $ git status
On branch merge-conflict
Your branch is ahead of 'origin/merge-conflict' by 2 commits.
(use "git push" to publish your local commits)
All conflicts fixed but you are still merging.
(use "git commit" to conclude merge)
Changes to be committed:
modified: file.txt
13. git commit -m "zatwierdzenie ostatecznej wersji pliku file.txt "
[merge-conflict 637488a] zatwierdzenie ostatecznej wersji pliku file.txt
14. git verify(tak się sprawdza czy zadanie zostało poprawnie rozwiązane )
Verifying the merge-conflict exercise. Hold on...
Exercise: merge-conflict
Status: FAILED
You didn't resolve the conflict properly (too many lines).
See your progress and instructions at:
https://gitexercises.fracz.com/c/epz
Jeśli ktoś ma ochotę pomóc to poproszę :)