Tsallaka zuwa abun ciki
Justice Tech School

Push and Pull

push sends commits to the remote and pull fetches and merges new ones.

Example
echo one > a.txt && git add a.txt && git commit -qm 'first'
git init -q --bare -b main ../r.git && git remote add origin ../r.git && git push -q -u origin main
cd ..; git clone -q r.git other; cd other
echo two >> a.txt && git commit -qam 'from other' && git push -q
cd ../repo && git pull -q
git log --format=%s

Result

from other
first

Exercise

Download and merge.

git 

Quiz Test

What does git pull do?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.