DEV Community

Rostyslav Harasymiak
Rostyslav Harasymiak

Posted on

Using Git version control: commit and push

There are quite a few Git operations we can do, but we want to focus on the two most important: commit your changes, and switch to a new branch. When you hear the word “commit”, think “snapshot”. When you hear the word “branch”, think “version”.
A Git commit is a snapshot of all of the folders and files in your project at a particular time. Since our files of code are all interdependent, it doesn’t make sense to save versions of individual files — we need to know the entire state of the project for a version to be useful.
Each branch (“version”) is a series of commits (“snapshots”).

Branching and Merging

Do you ever wish you could work on a completely separate version of your project in parallel to the current version? Perhaps to test an approach, or work on a new feature? And you want the option to eventually combine that code into your main project codebase?

Well, have a look at our documentation on branching and merging in VSCode with GitLens!

Top comments (0)