Linux Labs

Automation: Git and Ansible / Stage 2 of 6

Config from a repository: pull and conflicts

Not running Starting usually ~20 s
Leave the lesson

Step 7 of 7 · summary · 2 min

Summary

  • A bare repository keeps the shared history, and the working copy knows it as origin; git pull downloads commits and brings them into the files.
  • pull refuses if an uncommitted edit sits in a file the new commits change; git stash, git pull, git stash pop update the copy and keep the edit.
  • git push sends your commits; a “fetch first” refusal is answered with pull first.
  • A conflict means both sides changed the same lines: resolve the markers by hand, then git add, and after stash pop — git stash drop.
  • The pull at the start of the lesson refused because of the access_log line: it was added on the server to the same file the colleague's commit changed, and never committed.
Ubuntu 24.04
Loading…