remote
↔ to link local Git Repo to remote Git Repo
aka remote
git remote
to print list of all remote connected Git Repo
git remote add origin _URL
to add remote
Git Repo w name of origin
at _URL
git remote -v
to print remote
Git Repo name & URL
git remote show
to print details for remote Git Repo incl Branch
origin
(default) name for remote
Repo
git remote add upstream _URL
to sync local Repo w Upstream Github Repo
References
git remote add origin _URL
↔ to addremote
Git Repo w name oforigin
at_URL
git pull origin master
↔ to downloadremote
Git Repo namedorigin
&merge
with local repo namedmaster
git clone _URL newName
↔ toclone
remote
Repo (at_URL
) to local machine & rename tonewName
Github Repo
↔remote
Repo host on github.com--force
↔ flag to overwrite Commit History onremote
Repogit remote -v
↔ to printremote
Git Repo name & URLgit push --force origin __branch
↔ topush
local Commit toremote
Repo & FORCE sync to local (discardremote
history) 🔥 bad for teamwork!git push -u origin master
↔ topush
local Git Repo Branch at Master toremote
Repogit push --force-with-lease origin __branch
↔ to push local Commit to remote Repo & SAFELY sync (avoid overwrite remote history) ✅ often mandatory to not get fired!