Git Clone step revised: more stable and more reliable

Update your Git Clone step to 4.0.5 (or higher) as we had it totally rewritten to make it more concise, stable and reliable. Plus it'll be easier to contribute to it in case a new feature is needed. ✨

Update your Git Clone step to 4.0.5 (or higher) as we had it totally rewritten to make it more concise, stable and reliable. Plus it'll be easier to contribute to it in case a new feature is needed. ✨

In case of a Pull Request on GitHub, we cloned the pull request merge branch provided by GitHub (pull/<id>/merge), but we had multiple reports of Bitrise using an older state of code without the updates when a build was triggered. This was caused by GitHub's practice of not updating this special branch with every new incoming code update.

To ensure that the freshest version of the code gets tested, we revised our Git Clone step not to use the unreliable branch provided by GitHub. Instead, the step itself will make the merge to the target branch originating from the commit set, using the appropriate Git commands.

The commit-hash into which we merge the commit coming from the PR will be printed in the step log, so the merge will be exactly reproducible, and locally too. After each merge, we call a git checkout --detach command to ensure that we get into the "detached head" state so the HEAD refers to a specific commit, as opposed to referring to a specific branch.

Don't try this at home ⚠

Now the step has a new input called manual_merge, and if you set it to no, the old method can still be used, however, the default setting is yes. However, only use this if you are 100% sure that you know what you are doing. 😎

No items found.
The Mobile DevOps Newsletter

Explore more topics

App Development

Learn how to optimize your mobile app deployment processes for iOS, Android, Flutter, ReactNative, and more

Bitrise & Community

Check out the latest from Bitrise and the community. Learn about the upcoming mobile events, employee spotlights, women in tech, and more

Bitrise Insights

Cache | Caching

Mobile App Releases

Learn how to release faster, better apps on the App Store, Google Play Store, Huawei AppGallery, and other app stores

Mobile DevOps

Learn Mobile DevOps best practices such as DevOps for iOS, Android, and industry-specific DevOps tips for mobile engineers

Mobile Testing & Security

Learn how to optimize mobile testing and security — from automated security checks to robust mobile testing and more.

Product Updates

Check out the latest product updates from Bitrise — Build Insights updates, product news, and more.

The Mobile DevOps Newsletter

Join 1000s of your peers. Sign up to receive Mobile DevOps tips, news, and best practice guides once every two weeks.