We use lots of private gems in our current rails project.

When I am setting up the project on a new laptop. Every time I run the bundle install command, the bundler will change the gem’s URL from https:// to git:// in Gemfile.lock.

But after that. Gemfile.lock will be different with the remote one.

If you want to keep https:// in Gemfile.lock. You can try

$ bundle config github.https true

I hope this will help, cheers!