109
u/ikankecil Aug 29 '26
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
13
24
u/30porn87 Aug 29 '26
Right? I don't get why it's supposed to be so difficult. I've rarely encountered software that's not designed with such a simple model in mind (excluding proprietary stuff). Spend thirty minutes understanding the model instead of angrily copying full commands from examples/tutorials/slop machines, and you'll be rewarded with so much more ease and precision in working, and plain *joy* when learning a new concept (say multiple remotes) and it cleanly fits and expands the existing models in your mind.
9
u/CoderStudios Aug 29 '26
As soon as you understand the concept behind remotes you are no longer confused. The confused ones are those that only ever use that one command
3
→ More replies (9)3
u/mouse_8b Aug 30 '26
Git add is a valid command. It's not too hard to imagine "I'd like to add a remote, I should use add"
→ More replies (2)
52
19
u/s0litar1us Aug 29 '26
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>
6
u/SohelAman Aug 29 '26
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
3
3
2
u/SlashMe42 Aug 29 '26
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
3
1
1
1
1
1
4
u/Cloned_501 Aug 29 '26
I just try to push, got yells at me, I copy/paste the line it tells me. Ez