Commit (Git)

Uit De Vliegende Brigade
Naar navigatie springen Naar zoeken springen
Oh oh, main diverged from origin/main. Now the - Just an update commit is also part of this local branch - But actually, it always would be, as nothing has been pushed yet ;)

Git is designed around commits, which represent a snapshot of your project at a given time.

Examples that illustrate how this can play a role:

  • You can add and commit individual files, but by default, you're not expected to push individual files, but rather your repository as a whole
  • Once your local branch (e.g., main) diverges from origin/main (or whatever the branch is that you want to merge into), newly updates files will now also be added to your local branch - p.s.: Maybe that's obvious because you haven't pushed yet at this stage ;)