Reputation: 344
I've change one of the files on my local repository and I've add changes and save commit in git.
Now I want to send these changes and commit to project in GitHub.
Repository in GitHub exist but now I can add all the changes and commits.
How can I do that?
Upvotes: 1
Views: 698
Reputation: 742
As first command type;
git add *
then, write a commit message as follow:
git commit -m 'here the message'
and at the end, push the commit of your local repository on the online repository:
git push origin master
Probably this last command is the only one you need. If errors occur you need to type the command: git pull
and then git push
.
Upvotes: 0
Reputation: 142094
// add all your files
git add .
// commit all your changes
git commit -m "message"
// Make sure you have the latest code in case someone else has committed changes
git pull origin <branch name>
// Update github repository with your latest code
git push origin <branch name>
Upvotes: 3