Master Git & GitHub: From Everyday Tasks to Deep Waters
Light
Dark
System
Light
Dark
System
Part 1. Everyday Tasks
2
Light
Dark
System
Introduction to Version Control
project_v1
project_v2
project_final
project_final_final
project_final_final_2
project_final_final_last
project_final_final_last_of_us
The Stack Overflow Survey abandoned asking about preferred VCS after 2018, as Git's dominance had become indisputable.
You know what I'm sayin'?
Copying directories and renaming them is a go-to version control method for many people. It's so simple, and that makes it so appealing. But, this simplicity comes with its drawbacks:
It's easy to forget which directory you're in and accidentally write to the wrong file.
Multiple copies can quickly eat up disk space, especially with large files or complex projects.
Collaborating becomes a hassle. If team members work on their own copies, manually merging changes can be both cumbersome and error prone.
To tackle these issues, programmers created full-fledged version control systems (VCSs). And the most popular VCS is Git.
3
Light
Dark
System
Visualizing Git
In Git, you work with checkpoints called commits. Each commit is a snapshot of an entire project at the moment the commit is created. The typical workflow looks like this: you make some changes to a project, commit those changes, do more work, and commit again. Then, with the help of Git, you can do the following:
travel back to previous commits,
compare different versions of a project,
revert to an earlier version,
create a new branch to start a different line of work from any commit,
merge changes,
collaborate and share changes seamlessly.
Let's start by visualizing a basic Git workflow from a high-level perspective.
Initialize the project
Add the header
Add the intro section
Add the products section
Add the footer
Merge
Animate letters
Animate the spine
We'll be working on the studio website. First, let's initialize our project and make the corresponding commit
Then, add the header and make a commit
Next, add the intro section and commit changes
Now, we got the idea to animate the elements in the intro section. But we see this rather as an extra feature we'd like to experiment with, so instead of working on it on the main branch, we create a separate branch. After switching to the new branch, we start by animating the letters and make the first commit on our animation feature branch
After spending a day playing with the animation, we realized that it would be great to finish the main part of the project first, as the deadline is tomorrow. So now we return to the main branch
Then, we add the products section and make a commit
To finilize the main part of the project, we implement the footer and commit changes
With a couple of hours left before the deadline, we cherish the hope to complete the animation feature we started earlier. Therefore, we switch to the animation feature branch
Now, we speed run the animation of the spine and commit it. All that's left is to merge the animation feature into the main branch to have the final combined version of the project
So, we switch to the latest commit on the main branch
And do the merge
Nikmas Studio
Next-gen
publishing studio
that specializes
in creating
interactive
e-books
Our first book
Master Git & GitHub:
From Everyday Tasks
To Deep Waters
© Nikmas Studio, 2024
- Terms and conditions
- Privacy policy
- Cookies policy
For questions
and suggestions:
team@nikmas.studio
Main branch
Animation feature
branch
The End of Demo