question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Checking out wrong commit?

See original GitHub issue

I just introduced a failing test into the main branch of a project; the failing tests (introduced in the commit triggering the build) appeared not to have run in the PR build.

When I look at the actions/checkout output, I am surprised by what I see.

Specifically, the build is running on commit 2dca06e – however, actions/checkout appears to be merging the prior commit – c0121d5 – (without the tests) into the project’s main branch.

Is this expected?

Screen Shot 2020-07-10 at 9 55 09 PM

The project’s checkout configuration is completely vanilla: https://github.com/golangci/golangci-lint/blob/master/.github/workflows/pr.yml#L46

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:44
  • Comments:24 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
medikoocommented, Jul 22, 2020

This looks quite serious (allows to sneak not validated code as valid)

@ericsciple is there any specific timeline for this?

2reactions
andymckaycommented, Jul 31, 2020

I believe this is a dupe of #237, please see my comment here: https://github.com/actions/checkout/issues/237#issuecomment-667158637

Read more comments on GitHub >

github_iconTop Results From Across the Web

Git tip: how to fix an accidental commit on the wrong branch
Checkout the feature branch. You're now back on your feet, and you can keep working as if you never made the mistake in...
Read more >
What to do when you commit to the wrong Git branch
Make sure you are on the branch to which you have been committing. Use git log to check how many commits you want...
Read more >
How to fix committing to the wrong Git branch? - Stack Overflow
git checkout other-branch // take the temporary commit you created, and apply all of those changes to the new branch. //This also deletes...
Read more >
How to move a commit from a wrong branch to the right ...
First, we check out the wrong branch, log the commits and get the hash we're interested in. We move to the right branch,...
Read more >
Jenkins checkout the wrong commit when used with the local ...
Add a new Multibranch Pipeline Project in Jenkins, add as Source your git repository. Click on "Add Behaviour", select "Checkout to a local...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found