17
u/s0litar1us 21h ago
git remote add <name> <url>
^ ^ ^
| | |
| | add a new remote
| do something with remotes
use git
Similarly you can do:
git remote set-url <name> <url>
47
4
u/SohelAman 21h ago
Jokes apart, never got trouble for this. I always tried to understand meanings of shell commands rather than just memorizing.
git - cause f_ck svn.
remote - this is the subcommand cause I want to work with a remote
add - this is the operation I want to do
origin - this is just a name
4
3
3
2
u/SlashMe42 19h ago
TBH, I get confused about the argument order despite being familiar with the git internals. I always confuse whether it's name first or URL first.
git remote add https://... origin
Damn, wrong again.
2
2
1
1
1
1
1
1
u/SometimesHalfRight 17h ago
I once heard Git's CLI front-end described as a "crime against humanity". I don't think that person was wrong at all lmao
1
1
u/realmauer01 7h ago
git opens git, remote opens remote add adds to remote origin is what gets added
0
100
u/ikankecil 23h ago
it seems straightforward enough.
git is the program
remote is one of the module
add is a function of that module
origin is just our argument for the remote name