Stages changes vs changes

Hi guys, can someone please explain the difference between stages changes and changes in the source control panel after I click commit. It confuses me a lot and it’s just bugging my head.

When I make changes to my code and click on commit I just get confused. Will appreciate responses. Thanks

Hi,

This is the wrong section. Not an HTML/CSS question but rather a GIT question.

In GIT you manage changes in the source code.

When you change anything in a source file, GIT will notice it and put it in the changes.

Now you can commit you code which is kind of like validating it in order to be kept. But you don’t need to validate all the files that has been changed. So you can decide which one to commit by first staging them.

Hence the difference between changes and staged changes.

Hope this helped.

Cheers.

3 Likes

Staged Changes means the changes that you have decided to commit… in the next commit.

You can stage changes by pressing the ‘+’ button on the right side of changes in the Git panel in VS code.

If you make more changes to files after staging them, then those are unstaged changes. YOu can restage them to commit or decide to commit them later.

1 Like

One of Mosh’s courses covers GIT in detail. The challenge with git / github is that they use a lot of terminology that is unique and that makes it difficult to just “know” what means.

As a programmer, you really do need to know git and github. You can store your code there, roll back mistakes, merge with other developers, spin off branches, and a bunch more.

VSCode and most IDEs have git built in. They also give you the ability to upload your commits to github.com. It’s good practice to use these tools. It also makes it easier to use your same code base on multiple computers, which is what I do.

Another nice thing on github is you can setup virtual machines and even do software testing right on their servers. Lots of cool things there.

2 Likes

Thank you so much for the response! & noted about the wrong section.

Thank you so much!! I really appreciate it.

1 Like