Git - 'time travel drawer for code'

Git - Technology that saves and restores every moment of the 'time travel drawer' project. Git is a time travel drawer that records every moment of the code and a technology that can collaborate.

bamchi 412

Git - Technology to save and restore every moment of the 'time travel drawer' project

When developing, you will inevitably encounter moments like this:

  • "Why did the code that worked well until yesterday break today...?"

  • "Wait, what did I change...?"

  • "I want to safely back up before developing this feature..."

  • "Can I revert to the version I made 3 months ago?"

  • "Who changed this file and when?"

Git emerged to solve these kinds of problems.

And Git can be summarized like this.

Git = Time travel drawer that records every moment of the code.

A technology that allows you to go back to the past anytime,

collaborate with others on the same drawer without conflicts.


1. Git is not a technology that saves files

→ It is a technology that saves "changes"

Computers save files, but

Git saves traces of changes (Delta).

For example, let's say a file changed like this:

- name = "bamcoding"
+ name = "bamchi"

Git does not save the entire file again.

It just records the fact that this line has changed like this.

Thanks to this method, Git is:

  • Incredibly lightweight

  • Fast

  • Efficient

  • Able to store historical records almost infinitely

In other words,

Git = Change tracking system


2. Key structure of the 'time travel drawer' metaphor

The basic concepts of Git are clearly structured with the metaphor of a drawer.

Repository = My own time travel drawer

Where all versions of the project are stored.

Commit = Moment of closing the drawer with a 'click' and recording

A snapshot is saved.

Branch = Another timeline in the drawer

Opening a new timeline for developing different versions.

Merge = Act of merging timelines

Combining different realities into one.

Checkout = Moving to a specific point in time

Instantly moving to yesterday, last month, or a year ago.

Understanding this metaphor

makes Git suddenly easier.


3. Why developers don't panic when the code breaks

→ "Because the previous versions are always in the drawer"

People using Git gain this confidence.

"If it breaks? Just go back."

Committing

is like creating a new drawer.

You can go back like this if needed:

git checkout <past-version>

Or:

git revert

This ability gives beginners tremendous confidence.

They are no longer afraid of failure,

and can freely experiment.

This ultimately accelerates learning.


4. Absolute reason why Git is essential in collaboration

→ Because multiple people can create their own drawers within the same drawer

This is the true power of Branches.

For example, when 5 people work simultaneously:

  • A works on the login feature

  • B works on the payment feature

  • C works on UI changes

  • D works on bug fixes

  • E works on the admin feature

Although they are all working on the same project,

conflicts seem likely to arise...

But because they work in their own Branches (timelines),

the code does not mix.

Once all work is done,

they can be merged at the necessary point.

Git = Technology that enables collaboration without conflicts by separating timelines


5. Key features of Git that make developers strong

1) Every moment is recorded

All changes in documents, code, and projects are recorded.

2) Return to the past anytime

The fear of mistakes disappears.

3) Freedom to experiment (Branch)

You can test new features.

4) Collaboration is possible

Dozens of people can work on a single codebase.

5) Stable version deployment and release

80% of deployment difficulties arise from

not knowing "which version it is."

Git completely eliminates this problem.


6. Connection between Git and Rails development

→ Rails is a fast and risky development framework

Git acts as a safety net that helps handle that risk.

Rails is fast.

With speed comes frequent mistakes.

But with Git, it's okay.

git commit -m "Save initial version"
git checkout -b login-feature
# Develop the feature...
git checkout main
git merge login-feature

When the speed of Rails combines with the stability of Git,

the most powerful development cycle is completed.


7. Git becomes more powerful in the AI era

Because even though AI can write code,

AI

Cannot organize meta structures like

"where a version is stored" or

"which branch a change occurred in."

This is the role of human developers.

Even when letting AI make changes to the code,

it is risky without Git.

Through Git,

we can verify the changes made by AI

and revert them if needed.


Conclusion - Git is not just a simple version control tool. It is a technology that handles the 'entire time' of code and projects.

Git can be summarized as follows.

Git = Time travel drawer that saves every moment of the project

and allows you to go back to the past anytime.

Thanks to this ability, developers can:

  • Experiment

  • Make mistakes

  • Fix them

  • Collaborate

  • Maintain service versions stably

Learning Git

is like learning the "laws of physics" for handling code.

Comments

Add Comment

Your email won't be published and will only be used for reply notifications.

Continue Reading

Get notified of new posts

We'll email you when Bamchi Blog publishes new content.

Your email will only be used for new post notifications.