GitBash / GitExtensions问题提交本地更改

时间:2017-04-06 23:31:35

标签: git-bash git-commit git-extensions git-add git-status

我是个新手。

我已完成开发并准备检入我的文件。我以为我检查了所有内容,但是当我查看我的仓库时,我看到一个子目录没有签入。所以我试图强制git add . -f但是我收到了这个错误:

`$ git status
On branch develop
Your branch and 'origin/develop' have diverged,
and have 1 and 5 different commits each, respectively.
  (use "git pull" to merge the remote branch into yours)
nothing to commit, working tree clean`

我该怎么办?

我不关心回购中的任何差异我想把我的代码放在回购中(不用担心回购中的内容,我的代码应该替换所有东西)

再次,我该怎么办?

1 个答案:

答案 0 :(得分:0)

两个(git add -f .git status输出)无关。

首先,不要忘记提交刚刚添加的内容。

然后,要用您自己的远程历史记录替换,只需执行

git push --force

只要你是唯一一个负责该开发分支的人,那就没问题了。