Pages: [[dir:pages,except=^home$]] [[/devtools/github]] [[include only certain files]] ## Remote Repos To add a remote ```bash git remote add origin new.git.url/here ``` To change the remote repo (see [this stackoverflow question](https://stackoverflow.com/questions/2432764/how-do-i-change-the-uri-url-for-a-remote-git-repository)): ```bash git remote set-url origin new.git.url/here ``` you may need to ```bash git push --set-upstream origin master ``` ## Diff With Remote Repo ```bash git diff master origin/master ``` ## Submodules See [the git book](https://git-scm.com/book/en/v2/Git-Tools-Submodules) ## Force Pull To pull and overwrite any existing files: (see [here](https://www.freecodecamp.org/news/git-pull-force-how-to-overwrite-local-changes-with-git/)) ```bash git fetch git reset --hard HEAD git merge origin/$CURRENT_BRANCH ```