1

I'm trying to make Pull Requests to collaborate with an existing repo, so I forked it, then clone it, make the changes, create a branch, add, commit and push, then go to my GitHub to "Compare & Pull Request". Everything looks fine, but then it can't be merge due to this error:

enter image description here

enter image description here

I don't know what's happening but I think it has something to do with the branches...

I'm new using git branches, and I have some questions:

  • do I have to switch to the branch before making the changes? Or can I make the changes first and then worry about the branches?
  • how can I fix this error? and, if I find a solution, do I have to Pull Request again? or can I fix the existing PR somehow?
  • I need a new branch for each new PR, right? When I'm able to delete a branch? when the merge is done? should I delete them?
  • Looks like a bug in Gitleaks, whatever that is. – torek Sep 17 '20 at 05:20
  • 1
    Poking around a bit more, I found [this page of instructions](https://github.com/zricethezav/gitleaks-action) which says that if you configure it to check during pull requests *and* have a nonzero fetch depth, you *must* set it up with a fetch depth of at least 2 (which makes sense). Presumably whoever you're PR-ing against set it up with a depth of 1 instead. – torek Sep 17 '20 at 05:41

0 Answers0