在基于master和push -f的基础上,本地分支和除去分支分歧

时间:2019-04-08 12:29:43

标签: git

我在本地分支中有十几个提交,我已经将它们提交到远程分支。然后我多次执行const uploadDocumentToS3 = async (awsSign, file) => { try { var signedUrl = awsSign.signedRequest; var options = { headers: { "Content-Type": "application/pdf" } }; const upload = await axios.put(signedUrl, file, options); return upload; } catch (error) { console.log(error); } }; async function createStatement() { try { const content = await compile("statement", data); var options = { format: "A4" }; var fileName = "template"; pdf .create(content, options) .toFile(`./src/services/${fileName}.pdf`, async function(err, res) { if (err) return console.log(err); // get s3SignRequest const awsSign = await signS3(`${fileName}.pdf`, "application/pdf"); // upload file to s3 Bucket const uploadRes = await uploadDocumentToS3(awsSign, res.filename); }); } catch (error) { console.log(error); } } + git rebase master

因此,我确定远程分支已完全替换为本地分支。

但是当我执行git push -f时,我会看到类似

git status

On branch origin/fix/my-branch Your branch and 'origin/fix/my-branch' have diverged, and have 59 and 1 different commit each, respectively. (use "git pull" to merge the remote branch into yours) nothing to commit, working directory clean

$ git pull origin fix/my-branch

这是git在远程分支已合并到From my-server.local:bbb/web * branch fix/my-branch -> FETCH_HEAD Already up-to-date.

后试图删除本地分支时的内容
master

git版本2.7.4,Linux

更新

我刚刚意识到,该链中的第一次提交是由我从另一台计算机进行的,而在另一台计算机上,git帐户的电子邮件地址拼写错误。但是,这仍然不能解释分支之间的差异,因为它们的提交次数相同且提交哈希值相同。

0 个答案:

没有答案