- To learn how to submit changes to the remote repository.
Since clean repository, usually shared on any network server, we need to send our changes to other repositories.
Start by creating a change to be sent. Edit the README file and do a commit
This is the Hello World example from the git tutorial. (Changed in the original and pushed to shared)
git checkout master git add README git commit -m "Added shared comment to readme"
Now send changes to the shared repository.
git push shared master
The common repository is receiving sent us the changes. (Remember, we added it as a remote repository in the previous lesson).
$ git push shared master To ../hello.git 2faa4ea..79f507c master -> master
Note: We had to explicitly specify the master branch to submit changes. It can be configured automatically, but I always forget the command. For easy management of remote branches switch to «Git Remote Branch».