Skip to content

Abdelrahman-Zagloul/Git-Reference-Guide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ultimate Git Reference Guide

Welcome to the Ultimate Git Reference Guide!
This repository is a simple and practical collection of Git commands, workflows, and best practices.

It is designed to help developers quickly understand and use Git in real projects — including commits, branches, merges, configuration, and more.

It is still in progress — more commands and sections will be added soon.


Repository Structure & Quick Links

1. Core Concepts & Structure

  • Git Structure — Understand the Working Directory, Staging Area, and Local/Remote repositories.
  • Git Definitions — Key Git terms explained: commit, branch, merge, rebase, stash, HEAD, and more.

2. Configuration

3. Commit Management

  • Add Commit — Stage all files, specific files, or partial changes and commit.
  • Rename Commit — Amend the last commit or rewrite older/root commits using interactive rebase.
  • Delete Commit — Remove commits using soft, mixed, or hard reset, with rules for pushed vs non-pushed commits.

4. Branch Management

  • Add & Rename Branches — Create, switch, list, and safely rename branches locally and remotely.
  • Deleting & Recovering — Delete local or remote branches, prune stale branches, and recover lost branches using reflog.
  • Merge Branch — Local and Pull Request merges, fast-forward vs squash merges, resolving conflicts, and aborting merges.

How to Use This Repository

  1. Navigate to the section you need using the links above.
  2. Follow the step-by-step commands and notes.
  3. Use summary tables for quick reference if you’re in a hurry.
  4. Check examples in each file for real-world Git workflows.

This README is your starting point to explore all Git commands and best practices in this repository.

About

Ultimate Git Reference Guide — A practical collection of Git commands, workflows, and best practices for developers.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors