Using Git Stash: A Quick Guide to Saving and Restoring Changes

Introduction Git, a well-known distributed version control system (DVCS), provides a comprehensive suite of features for managing a project’s history and collaborating effectively. While working with Git, situations arise where you want to switch to a different branch while you have uncommitted changes. Attempting to switch branches without committing your changes results in an error message like the following: 1 2 3 4 error: Your local changes to the following files would be overwritten by checkout: file.txt Please commit your changes or stash them before you switch branches. Aborting This error indicates that changes in the file file.txt are blocking the branch switch. In such scenarios, you have the option to either commit your changes or temporarily save them. In this tutorial, we’ll explore how to temporarily save your changes using Git stash, allowing you to switch to a different branch. ...

July 26, 2024 · 3 min · 609 words · In-Jun Hwang

Git Branch Naming: For Effective Collaboration

Introduction Git is an essential version control tool in modern software development. Effective Git usage involves systematic branch management, and following a consistent branch naming convention is a crucial part of it. In this post, we will discuss the fundamental rules and best practices for Git branch naming. Basic Naming Conventions Here are the basic branch naming conventions: Use lowercase: Branch names should always be in lowercase. Use hyphens (-): Separate words with hyphens. Be concise: Keep branch names concise but descriptive. Use English: Favor English for global accessibility. Example: feature-user-authentication ...

July 23, 2024 · 2 min · 331 words · In-Jun Hwang

REST API: From Principles to Considerations

Introduction In modern web development, Representational State Transfer (REST) APIs play a pivotal role. A well-designed REST API enables efficient communication between systems and greatly enhances developer productivity. In this article, we’ll cover everything from the fundamental concepts of REST to the 6 core principles, and delve into specific rules and best practices that you can apply when designing real-world APIs. REST Fundamentals REST is a software architectural style introduced by Roy Fielding in his 2000 doctoral dissertation. REST leverages existing web technologies and the HTTP protocol to define an architecture for distributed hypermedia systems. ...

July 20, 2024 · 4 min · 738 words · In-Jun Hwang

Creating Pull Requests with GitHub CLI

Let’s dive into a detailed explanation of how to create Pull Requests (PRs) using GitHub CLI. GitHub CLI is a tool that allows you to perform GitHub operations directly from the terminal, enabling efficient work without going through the GUI interface. 1. Introduction to GitHub CLI GitHub CLI (gh) is GitHub’s official command-line tool that enables you to use most GitHub features from the terminal. The main benefits of this tool include: ...

July 19, 2024 · 5 min · 961 words · In-Jun Hwang

Effective Git Commit Management: Beyond Clean Code to a Clean History

Introduction Version control systems, particularly Git, have become indispensable tools in modern software development. However, merely using Git is not enough. Effective commit management practices significantly impact project success and team productivity. In this article, we will explore how to manage Git commits more effectively. Specifically, we will focus on three key strategies: applying the Single Responsibility Principle, committing frequently, and reviewing commits before pushing. 1. Apply the Single Responsibility Principle Apply the Single Responsibility Principle (SRP), one of the SOLID principles of software design, to your Git commits. ...

July 13, 2024 · 3 min · 581 words · In-Jun Hwang