Run ❯
Get your
own
website
❯
Run Code
Ctrl+Alt+R
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Change Language
Go to Spaces
Ctrl+Alt+P
# Set up a repository where main and feature-branch change the same line git init -q echo "Hello" > filename.txt git add filename.txt git commit -q -m "Add filename.txt" git checkout -q -b feature-branch echo "Other branch's changes" > filename.txt git commit -q -am "Change filename.txt on feature-branch" git checkout -q main echo "Your changes here" > filename.txt git commit -q -am "Change filename.txt on main" # Merge feature-branch: it stops with a conflict git merge feature-branch # Fix the conflict: write the text we want to keep echo "Your changes here, and the other branch's changes" > filename.txt # Mark the file as resolved, then check the status git add filename.txt git status
Auto-merging filename.txt
CONFLICT (content): Merge conflict in filename.txt
Automatic merge failed; fix conflicts and then commit the result.
On branch main
All conflicts fixed but you are still merging.
(use "git commit" to conclude merge)
Changes to be committed:
modified: filename.txt