如何将更新从本地存储库推送到BitBucket?

时间:2016-04-25 07:25:56

标签: git bitbucket

所以我创建了一个本地存储库,并对BitBucket Repo进行了一些更改。

之后,我在本地存储库中进行了一些更改。

我尝试使用git push origin master命令将这些文件推送到BitBucket。它说所有文件都是最新的。但我没有在BitBucket页面上看到任何变化。

对此有任何帮助吗?

2 个答案:

答案 0 :(得分:0)

检查您是否有未提交的更改 看起来您忘了将文件添加到暂存区域。

执行{{1}}并检查您是否有未跟踪/修改过的文件

enter image description here

答案 1 :(得分:0)

你收到了这条消息,是吗?

$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    modified:   README.md

no changes added to commit (use "git add" and/or "git commit -a")

Git会尽力帮助您并向您解释您需要做什么 使用“git add ...”来更新将要提交的内容

所以,只需在远程服务器上推送您的更改

$ git add -A ./
$ git commit -m "add some comment here"
$ git push origin master

您可以阅读有关git add此处

的手册
$ git help add

$ man git-add
相关问题