无法创建拉取请求

huangapple go评论150阅读模式
英文:

Can't make a pull request

问题

我有这个存储库,是从另一个存储库fork过来的,现在我需要向它提交一个拉取请求,但它显示:“没有可比较的内容”,而且我的提交不显示:
https://github.com/amorimll/desafio-sharenergy-2023-01

任何帮助都将不胜感激,我真的需要在今天完成这个。

这是在git rebase中显示的:

英文:

I have this repository that i forked from another one, and now i need to make a pull request to it, but it says that: "There isn’t anything to compare.", and my commits are not showing:
https://github.com/amorimll/desafio-sharenergy-2023-01
无法创建拉取请求

Any help is appreciated, really need this for today.

This is showing in the git rebase:

无法创建拉取请求

答案1

得分: 1

"Short answer: 将检出到您的main分支以获取最新代码,然后返回到您当前正在工作的分支并执行git rebase [currentBranchName] main

Explain: 当您从另一个分支创建分支时,就好像在那一刻从该分支创建了代码快照。理想情况下,您从中复制的分支应该尽量避免进行任何更改,直到您完成在新分支上的工作并创建了PR并完成合并。rebase命令的作用是,如果原始分支有更改,它将首先从该分支中提取最新的代码到您的工作分支,然后应用您对当前工作分支所做的任何更改。通常,这个过程需要解决一些冲突,如果它们修改了相同的文件。

希望这有助于您理解 :)"

英文:

Short answer

will be checkout to your main branch get the lastest code, then go back to your current working on branch and do git rebase [currentBranchName] main

Explain

so when your create a branch from another branch, is like your created a snapshot code from that branch at that moment. ideally the branch you copied form should prevent make any more changes if possible, until you done working in the new branch and create the PR and done marge it.
what rebase command will do is in case the origin branch had changes, it will pull the latest code form that branch into your working branch first, then to applied any changes you was made for your current working branch. Usually this process will need have some conflict need to fix, if they changed the same file.

Hope this is help you understand 无法创建拉取请求

huangapple
  • 本文由 发表于 2023年1月11日 06:01:59
  • 转载请务必保留本文链接:https://go.coder-hub.com/75076312.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定