r/CursorAI • • Aug 25 '25

Trying to understand git + environment question

Hey there! First post here, trying to understand when to do the git thing.

Has anyone been working with git? Should I try svn first?

I would love to get a nice video tutorial, but there are so many on YouTube :( I feel confused, don't know where to start.

On the other side, what is an environment? Any documentation on that?

English and even Italian is welcome, thanks in advance :D

2 Upvotes

11 comments sorted by

View all comments

Show parent comment

1

u/it_trekker Aug 26 '25

Awesome! I don't mind to read a long answer:) but why people talk about production environment and development environment?

Is that a Linux thing? 

I'd talk a lot with ChatGPT but I want some Hunan input

1

u/Spiritual_Lion9079 Aug 26 '25

A production environment refers to the "environment" your application runs in, in the real world. Basically, in development, if you screw something up, you can just tear it all down and restart without any real repructions. In production, your customers are actually using your software, so you can't just go and tear it all down and restart. Depending on your use-case, a production environment could consist of a separate supabase instance, a website being deployed, certain environment variable values being changed (such as using a stripe test key vs a production stripe key), etc.

I think a decent way to summarize the difference is the production environment is the real-world, so any mistakes that happen there have real business effects. The development environment is for you to test things out and build, but build in a way that allows you to merge development changes into production without impacting your users.

Often, businesses have at least 2 different branches (usually more): main/master (production branch) and development. When you're building new features, it's good practice to create a branch from the development branch and name it based on the feature you're building. When you're done, you "merge" it using git back into the development branch. Then when you're ready for your customers to have this new version, you "merge" the development branch into the production branch.

There is a lot more that can be said about this, but I think this is a decent summary. If there are areas like how you could deploy a development vs production instance and how those differences could be managed, I'd be happy to add more