GIT Commands
GIT Commands
Note:
What is git remote add ...?
As you probably know, Git is a distributed version control system. Most operations
are done locally. To communicate with the outside world, Git uses what are called
"remotes". These are repositories other than the one on your local disk which you
can push your changes into (so that other people can see them) or pull from (so
that you can get others changes). The command git remote add origin
[email protected]:peter/first_app.git creates a new remote called origin located at
[email protected]:peter/first_app.git. Once you do this, in your push commands, you
can push to origin instead of typing out the whole URL.
This is a command that says "push the commits in the local branch named master to
the remote named origin". Once this is executed, all the stuff that you last
synchronised with origin will be sent to the remote repository and other people
will be able to see them there.