Categories

Category cover

Automation
155 posts

Category cover

Learning paths
119 posts

Category cover

CISO
22 posts

Category cover

Security
20 posts

Category cover

Notes
19 posts

Category cover

Personal Security
18 posts

Category cover

Infrastructure
12 posts

Category cover

OT/ICS
5 posts

Category cover

Books
3 posts

Category cover

UNetLab
3 posts

Category cover

Write-up
3 posts

Category cover

OSInt
2 posts

Category cover

My life
1 posts

Git fundamentals for developers and IT professionals

Andrea Dainese
September 06, 2024
Post cover

Git is a distributed version control software created by Linus Torvalds to manage the Linux kernel source code . Personally, I use Git, along with GitHub , to manage:

Git allows me to track every change and, overall, the evolution of a repository. It’s well-suited to handle any file that can be represented as text. This is why, for the past few years, I’ve been using Markdown  to write text and have embraced the Documentation as Code approach.

Git is a vital tool that should be mastered by anyone working in IT, but it’s essential for developers.

Before getting started, here are some important considerations:

  • Storage: Git saves every version of every file. For text files, we know that changes can be represented by just the lines that have been modified, but for binary files, a revision often means saving a full copy of the file. So, keep in mind that a repository may grow in size, and it might require maintenance to reduce the space used, which will improve its performance.
  • Clean Structure: Especially when working in a team, it’s important to adopt a common workflow. The repository should only contain the files necessary to recreate the environment and avoid cache, compiled, or temporary files.
  • Security: Since Git saves permanent copies of all files added to the repository, be cautious about including files with sensitive information like passwords. While you can remove references to such files locally, this process isn’t fully effective on third-party platforms like GitHub.

In this series of posts, we’ll explore the fundamentals of Git. For those interested in learning more, I recommend the following resources:

Working Locally

Let’s start working with Git by creating a local repository. Any empty or non-empty directory can be initialized as a Git repository:

The commands above create a .git directory, which contains all the information for the repository. As long as this directory remains intact, the contents of the repository are safe.

Continue reading the post on Patreon .