git config --global user.email "xxx@gmail.com"
git remote add origin https://github.com/phien-ntace/how_to_use_git.git
- Git will show CONFLICT and stop.
- You must open the file and resolve the conflict manually.
- After resolving:
- Method 1: Commit changed file and pull
- Method 2: Use stash to store changes
- If you don't want to commit yet and just want to temporarily save the changes before pulling.
- If stash pop causes a conflict, Git will ask you to resolve it like a regular merge.
- Method 3: Discard changes (do not keep edited file)
- If you don't need the current .vscode/settings.json and want to overwrite it with the latest version from GitHub: