This repository serves as a comprehensive, organized cheat sheet and practice environment for essential and advanced Git commands. It is designed to be a quick reference guide and a sandbox for reinforcing understanding of version control concepts, from basic commits to complex operations like stashing, rebasing, and reverting.
The goal is to provide clear, concise explanations and practical examples for every command, making it an invaluable resource for beginners and a handy refresher for experienced developers.
The commands are logically grouped into the following categories for easy navigation and learning:
| Category | Focus | Example Commands |
|---|---|---|
| Basic Workflow | Initialization, Status, Staging, Committing, and History. | git init, git status, git add, git commit, git log |
| Branching & Merging | Creating, Listing, Switching, and Combining different lines of development. | git branch, git checkout, git merge |
| Remote Operations | Connecting to GitHub, Pushing, and Pulling changes. | git remote, git push, git pull |
| Advanced Operations | Undoing changes, cleaning the working directory, and temporary saving. | git reset, git revert, git stash, git clean |
| Inspection | Viewing changes between files or commits. | git diff, git show, git blame |
| Tagging | Marking specific points in history (e.g., releases). | git tag |
This repository is primarily a reference guide, but you can also use it as a practice environment:
- Clone the Repository:
git clone https://github.com/Nawafalzanbaqi/Git-Fundamentals-Practice.git
- Navigate to the Directory:
cd Git-Fundamentals-Practice - Practice: Use the commands listed in the
README.mdto experiment with Git in a safe, isolated environment.
- Experiment: Try each command with different flags (e.g.,
git log --oneline,git reset --hard). - Read the Docs: For deeper understanding, use
git help <command>after practicing the examples here. - Contribute: If you find a useful command or a better explanation, feel free to contribute!
If you have a favorite Git command or a clear explanation you'd like to add, please submit a Pull Request. All contributions that enhance the learning experience are welcome.
[Specify License, e.g., This project is open-source and available under the MIT License.]