What did we learn in this module?
Well, we learned about Git first
and we learned that Git is all about version management.
It is a tool to keep track of code changes
in a very efficient and actually also easy to use way
once the basics are set.
These basics involved some core commands,
which you don't have to remember by heart,
but the more you use Git,
the more common these commands will become to you.
With Git init,
we were able to initialize a so-called Git repository.
So we turned our project folder into a working directory,
and the Git repository holds all the logic
to keep track of our file changes.
We also learned about Git add.
Git add helped us to bring our changes
and our files and folders to the so-called staging area,
which makes Git aware of the files
that we want to implement,
or the changes made to these files
that we want to implement in our next commit.
A commit is a snapshot of the code,
a current snapshot of the code you want to take,
and also a snapshot we can jump back to historically
if we want to.
With Git commit dash M and then a commit message
in parenthesis, we were able to also give these snapshots
a name to quickly identify these
throughout our code history.
Besides commits, we also have branches.
A branch is kind of a folder holding all our commits,
all our snapshots, and by working in different branches,
we can make sure that our core project
remains in the main or master branch
and any deviations from that, any additional features
you might want to work on are part of a feature branch
or a branch having any other name of your choice,
which allows you to work on specific features,
and once once this feature is finished,
you can merge it back into the main branch.
With Git checkout dash B,
we were able to create such other branches
based on the branch we are currently working in.
Besides Git, our version management tool,
we also have GitHub, which is all about repository hosting.
So it helped us to bring our local projects to the cloud.
Git remote add origin, allowed us to establish a connection
between Git and GitHub.
This was very helpful to, well then,
push our local project from Git to GitHub.
Besides pushing, we also learned
that if changes are added remotely on GitHub,
for example in a project where other people
collaborate together with us,
and when these changes are only available on GitHub,
we also want to have this updated code locally on Git.
Well, this is possible with Git pull.
Besides Git push and Git pull, we also had Git clone.
Git clone is the command to use
if an existing remote repository contains code already,
and if we want to access this code locally
via Git on our machine,
and we also learned that to make this whole process,
this exchange of information
between Git and GitHub possible,
we need to understand the concept
of the personal access token.
This token grants the local Git user
access to a GitHub account
and the corresponding repositories
which are part of this account,
and to make this whole thing work perfectly,
we learned that using GitHub all alone
is not the final solution.
We saw that by adding collaborators for example
in combination with the personal access token,
this allows us to efficiently collaborate on projects
via Git and GitHub.
And whilst this was a first overview of these two tools,
I highly recommend you to dive deeper into this topics
on your journey to become a web developer.
To dive deeper here, you can of course check out
the official webpages, git-scm.com or github.com
to learn more about these tools,
also in the official docs.
Or you can also explore our Git and GitHub,
the practical guide course,
which is, well, a very thorough introduction
into these tools and which also goes a lot deeper
than this introduction we had here
throughout this web development course.
Nevertheless, I hope you now understand
how version management works
and therefore it's time to leave the space
and to continue with our web development course now.