$ git remote -v
# No repos
$ git remote add origin [email protected]:pjpscriv/access-aware-reporting.git
$ git remote -v
origin [email protected]:pjpscriv/access-aware-reporting.git (fetch)
origin [email protected]:pjpscriv/access-aware-reporting.git (push)
$ git remote
# 2 repos
some-remote-name
another-remote
$ git remote rm some-remote-name
$ git remote
# 1 repo now
another-remote
What’re those remote repos fam. -v makes it way better (see below).
$ git remote
origin
$ git remote -v
# More deets
origin [email protected]:pjpscriv/ccs-dashboard.git (fetch)
origin [email protected]:pjpscriv/ccs-dashboard.git (push)
Adding a remote fam. Easy.
# TODO: Add padding in here i.e. list remotes before/after
$ git remote add heroku <https://git.heroku.com/peter-bot-test.git>
<remote-name> masterYou’ll use this when you have multiple remotes. <remote-name> will be the name of the remote. master being the branch you’re pushing.
# Git repo with new commit
$ git push origin master
# Pushing, but specifiying the remote
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 270 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To github.com:pjpscriv/pixel-dp.git
c8f0f87..72c5a08 master -> master
List them config settings. You can do way more stuff with config, but -l (for list) is a cool place to start.
$ git config -l
user.name=Peter Scriven
[email protected]
push.default=simple
core.repositoryformatversion=0
core.filemode=truecore.bare=false
core.logallrefupdates=true
[email protected]:pjpscriv/ccs-dashboard.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
diffs with the current state of the repo with a the specified commit hash id thing. Where origin can be any other remote as well, like in this example it’s heroku.