Reputation: 15069
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.
Upvotes: 46
Views: 188744
Reputation: 1
just type "git push" if this doesn't give you a positive replay, then check if you are connected with your repository correctly.
Upvotes: -1
Reputation: 13602
git push
or
git push server_name master
should do the trick, after you have made a commit to your local repository.
Upvotes: 4
Reputation: 25396
You just need to make sure you have the rights to push to the remote repository and do
git push origin master
or simply
git push
Upvotes: 18
Reputation: 2592
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:
Upvotes: 39
Reputation: 386342
Have you tried git push? gitref.org has a nice section dealing with remote repositories.
You can also get help from the command line using the --help
option. For example:
% git push --help
GIT-PUSH(1) Git Manual GIT-PUSH(1)
NAME
git-push - Update remote refs along with associated objects
SYNOPSIS
git push [--all | --mirror | --tags] [-n | --dry-run] [--receive-pack=<git-receive-pack>]
[--repo=<repository>] [-f | --force] [-v | --verbose] [-u | --set-upstream]
[<repository> [<refspec>...]]
...
Upvotes: 0