Stop Using git checkout
Git 2.23 introduced two commands that replace the two different jobs git checkout used to do: git switch — change or create branches git restore — restore/discard file…
Read articleGit 2.23 introduced two commands that replace the two different jobs git checkout used to do: git switch — change or create branches git restore — restore/discard file…
Read articleIf you’ve accidentally deleted multiple tracked files in your Git repository, you can bring them all back at once using this simple command: git restore $(git status --porcelain…
Read articleHere's how to rename your project both on GitHub and your local development machine. Renaming on GitHub First, let's rename the repository on GitHub's web interface: Navigate to…
Read articleIf you're like me, you've probably been using Git for years without realizing there's a feature that could make your life significantly easier. Enter includeIf: a powerful Git…
Read articlePulling changes from the main branch into your feature branch is a common task before pushing changes and creating a pull request/merge request. Note: This guide uses "main"…
Read articleGit worktrees provide a flexible way to work with multiple branches in separate directories. Basic Syntax The basic syntax for creating a new worktree is: git worktree add…
Read articleJujutsu is an experimental version control system designed to be both powerful and user-friendly. Created by Martin von Zweigbergk, it started as a hobby project in 2019 and…
Read articleWhen you encounter merge conflicts while trying to apply stashed changes using git stash apply, and you just want to force apply the changes without any hassle, you…
Read articleTo rename the master branch to main and make it the default branch in your GitHub repository, follow these steps: Clone the repository from GitHub: Open your terminal…
Read articleMoving a Git repository to another (or from one hosting platform like Bitbucket to another like GitHub) while preserving the full history, including all commits and branches, is…
Read articleFeature branches act as a container for new functionality you're adding or changes you're making to a project while keeping your main branch untouched. They help keep your…
Read article