开发者

How can I upload committed changes to my GitHub repository?

I used clone to create a local copy of my repository on GitHub.

I modified a few files. Then I did: git commit -a

And now I want to save my committed change开发者_JS百科s to the GitHub repository.

How can I do that?


You push your changes:

git push origin master

Replace master with the name of the branch you want to push, if different from master.

In case the branch was updated since your last update, the changes may be rejected. In that case you have to pull the latest changes on the remote branch first:

git pull origin master

Optionally, you can rebase your changes on top of the remote master (this will prevent a merge commit), by using:

git pull origin master --rebase


Follow this steps:

1. cd /project path
2. git add *
3. git commit -m "Enter commit message here"
4. git push


You want to push your changes to the central repo with git push. It might prompt you for your github password.


To publish your local changes follow the 3 simple steps below:

  1. git add <filename> or git add * to add everything
  2. git commit -m "Enter e message here"
  3. git push
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜