⚠️ Malware / Trojaner / VirenGuardBreaker: Derailing AI-assisted malware analysis with a code comment(10.09.2026 um 11:00 Uhr)
⚠️ Malware / Trojaner / VirenAttack hides malware in PNGs and drops custom reverse tunnel on victims' machines(31.08.2026 um 20:26 Uhr)
⚠️ Malware / Trojaner / Viren33-hour BGP hijack of Softaculous traffic prompts security scramble(01.09.2026 um 14:04 Uhr)
🕵️ SicherheitslückenProlific Microsoft 0-day hunter drops CrowdStrike Falcon exploit PoC(03.09.2026 um 20:08 Uhr)
🔧 AI Nachrichten OpenAI commits $1B in AI credits to frontline cyber defenders(04.09.2026 um 01:47 Uhr)
⚠️ Malware / Trojaner / VirenGuardBreaker: Derailing AI-assisted malware analysis with a code comment(10.09.2026 um 11:00 Uhr)
⚠️ Malware / Trojaner / VirenAttack hides malware in PNGs and drops custom reverse tunnel on victims' machines(31.08.2026 um 20:26 Uhr)
⚠️ Malware / Trojaner / Viren33-hour BGP hijack of Softaculous traffic prompts security scramble(01.09.2026 um 14:04 Uhr)
🕵️ SicherheitslückenProlific Microsoft 0-day hunter drops CrowdStrike Falcon exploit PoC(03.09.2026 um 20:08 Uhr)
🔧 AI Nachrichten OpenAI commits $1B in AI credits to frontline cyber defenders(04.09.2026 um 01:47 Uhr)

🔧 Programmierung 🕛 vor 2 Monaten 3 Min Lesezeit
0

Understanding Why `main` and `dev` Diverged

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht




Scenario



You were working on the dev branch.



While you were making commits locally, someone (or you) also made changes directly to the main branch on GitHub.



As a result, both branches moved forward independently.









What Happened?






Initial State






CODE
A (common commit)

├── main
└── dev






Both branches point to the same commit.









Changes Added to Main






CODE
A ── B ── C   (main)

└─────────── (dev)






Example:




  • B = README update

  • C = CodeQL update









Changes Added to Dev






CODE
A ── B ── C          (main)

└── D ── E ── F (dev)






Example:




  • D = Base crawler

  • E = Class-based crawler

  • F = Concurrency implementation



Now both branches contain unique commits.



This situation is called:




Branches have diverged.










Why git pull main Did Not Work



Many developers think:




CODE
git pull main






means:




"Pull changes from main branch"




But Git interprets it differently.



main is only a local branch name.



Git expects:




CODE
git pull <remote> <branch>






Example:




CODE
git pull origin main






Where:





  • origin = GitHub repository


  • main = branch on GitHub









Correct Way to Update Dev



While on the dev branch:




CODE
git fetch origin
git merge origin/main












What Does git fetch Do?






CODE
git fetch origin






Downloads the latest information from GitHub.



Before fetch:




CODE
Local Git:
main -> C

GitHub:
main -> G






After fetch:




CODE
main         -> C
origin/main -> G






Git now knows about the latest remote commits.



No files are changed yet.









What Does git merge origin/main Do?






CODE
git merge origin/main






Git combines:




CODE
dev
+
latest main






Before merge:




CODE
A ── B ── C          (origin/main)

└── D ── E ── F (dev)






After merge:




CODE
A ── B ── C
│ \
│ M (dev)
│ /
└── D ── E ── F






M = Merge Commit



Now dev contains:




  • All main changes

  • All dev changes









If Merge Conflicts Occur



Git may stop and show:




CODE
CONFLICT






Example:



Both branches modified:




CODE
README.md






Git cannot decide which version to keep.



You must manually fix the file.



After fixing:




CODE
git add .
git commit






Git creates the merge commit.









Push Updated Dev






CODE
git push origin dev






Now GitHub receives the merged version.




CODE
main -> C

dev -> M












Create Pull Request






CODE
dev  --->  main






GitHub PR contains:




  • README updates

  • CodeQL updates

  • Crawler changes

  • Concurrency changes



Everything together.









Alternative Workflow



You may also update your local main first.




CODE
git checkout main
git pull origin main

git checkout dev
git merge main

git push origin dev






Result:




CODE
latest main
+
latest dev
=
updated dev












Simple Mental Model



Think of branches as two roads.




CODE
            main road
B ── C
/
A
\
D ── E ── F
dev road






Both roads started from the same place.



Before creating a Pull Request, connect the roads:




CODE
            B ── C
/ \
A M
\ /
D ── E ── F






Now everything is connected.









Safe Workflow Summary






CODE
git checkout dev

git fetch origin
git merge origin/main

# fix conflicts if needed

git add .
git commit

git push origin dev






Create PR:




CODE
dev → main






This is the safest and most common workflow when main and dev have diverged.

Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
1 Quelle
GuardBreaker: Derailing AI-assisted malware analysis with a code comment
1 Quelle
Attack hides malware in PNGs and drops custom reverse tunnel on victims' machines
1 Quelle
33-hour BGP hijack of Softaculous traffic prompts security scramble
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Understanding Why `main` and `dev` Diverged

Thematisch verwandte Begriffe: Understanding, main, Diverged · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...