How to commit to remote git repository

Ahmed picture Ahmed · Apr 28, 2012 · Viewed 140.4k times · Source

I am new to git.
I have done a clone of remote repo as follows

git clone https://[email protected]/repo.git

then I did

git checkout master

made some changes and committed these changes to my local repository like below..

git add .

git commit -m "my changes"

Now I have to push these changes to the remote repository.
I am not sure what to do.

Would I do a merge of my repo to remote ?
what steps do I need to take ?

I have git bash and git gui

please advise,
thanks,

Answer

zafarkhaja picture zafarkhaja · Apr 28, 2012

All You have to do is git push origin master, where origin is the default name (alias) of Your remote repository and master is the remote branch You want to push Your changes to.

You may also want to check these out:

  1. http://gitimmersion.com/
  2. http://progit.org/book/