Git: git pull (Get Update)
How to get update from a remote repository?
git pull URL
- update local repo from a remote repo at URL
# cd to my git project dir cd ~/git/xah-fly-keys # pull from a remote repository git pull https://github.com/xahlee/xah-fly-keys
How to force a pull?
sometimes when you do a pull, you got errors saying conflict or other.
if you don't care about your working dir, simply want a fresh copy from source, just clean your working dir first, then pull.
git reset --hard
- discard local changes
git clean -xdf
delete all untracked local files and dirs.
Warning: be careful.