3.4 Working with remotes
git clone <repo url>
: downloads code from a code repository into your current directorygit remote -v
: lists all the remotes and their short names (e.g., origin, upstream)git remote add <name> <url>
: adds the<url>
to your remotes and gives it the short name<name>
(e.g.,git remote add origin <URL>
)git remote rm <name>
: removes a remote by its shortnamegit push <where> <what>
: pushes code on the<what>
branch to the<where>
remote (e.g.,git push origin master
)git pull <where> <what>
: pulls does down from the<what>
branch from the<where>
remote (e.g.,git pull origin master
)