> you are the origin, the repo is the master
>> origin which is what I have on my computer, to the master which is what is stored on github?
no, that's backwards
the remote refers to
another repository that you want to track its changes (fetch) and upload your changes to (push)
remote is outside, far far away, not local (this may help you when you'll need to resolve a merge conflict)
`origin' is just a name, an alias for the address
> I see git push origin master. What is origin and what is master.
push: upload the changes
origin: the remote repository
master: the branch you want to upload.
`master' refers to a commit (state of your code) in your local machine.
It tends to be used with a `main' or `publish' meaning (this code works)
You may also do `git push origin feature_foo` for the team to see the changes that are not quite done yet to be on master
(additional read
https://www.atlassian.com/git/tutorials/comparing-workflows )
> One time i got the message back "Your branch is ahead of 'origin/master' by 1 commit.
as I said before, remote is another repository and as such it may also contain branches
when you do `git push origin master` you are saying «update the master branch of the origin repository with the contents of my master branch»
The message is simply saying that your local and remote repos don't have the exact same code, that you have committed some change since the last fetch/push
> VS code has a solid easy to use git interface built into it. Once you are
> happy with the command line, find something like this if you want a gui.
I don't know if you should wait to use a «friendly» interface, but these are some things that you should be able to do with ease in whatever tool you chose:
- know what changes are yet to be committed/discarded
- navigate through the history (¿what this commit did?)
- compare your code to another state in the history (or another branch, or against a remote)
- revert your code to a previous state
- resolve merge conflicts
By the way, apart from learning the tools, it's important to learn to write good commit messages and adopt a good workflow for your team.