Boost your productivity with git - A comprehensive guide for beginners and advanced users
Visit the live documentation at: https://xabirhasan.github.io/git/
Welcome everyone!
When I first started using Git, I have to admit, I was a bit intimidated. I had heard so much about it and knew it was an essential tool for any developer, but I didn't know where to begin. I struggled with understanding the basic commands and couldn't seem to wrap my head around the whole concept of version control.
I started by going through online tutorials, reading documentation, and experimenting with different commands. I would spend hours trying to understand the different branches, commits, and merge conflicts, but I was determined to make it work. And eventually, with a lot of practice and patience, it clicked.
I hope that by sharing my experience, I can help others who may be struggling with Git at the beginning. I know it can be overwhelming, but trust me, it's worth it. With the right mindset, patience and resources, you too can master Git and improve your workflow.
This guide is designed for both beginners and advanced users who want to master the art of Git and improve their workflow. Whether you are a new developer just starting out with version control or an experienced professional looking to optimize your Git skills, this guide has something for everyone. We will cover essential Git commands, advanced techniques, and helpful hacks that will help you work more efficiently and effectively with Git. So let's dive in and discover the full power of Git!
- 📚 Comprehensive Documentation - From basic commands to advanced techniques
- 🎯 Beginner Friendly - Clear explanations with practical examples
- ⚡ Quick Reference - Complete cheatsheet for common commands
- 🚀 Advanced Techniques - Master rebasing, cherry-picking, bisecting, and more
- 💡 Real-World Examples - Learn through practical scenarios
- 🔧 Best Practices - Industry-standard workflows and tips
- Node.js version 18 or higher
- npm or yarn
# Clone the repository
git clone https://github.com/XAbirHasan/git.git
cd git
# Install dependencies
npm install# Start the dev server
npm run docs:devVisit http://localhost:5173 to view the documentation.
# Build for production
npm run docs:build
# Preview the production build
npm run docs:preview.
├── docs/
│ ├── .vitepress/
│ │ └── config.mts # VitePress configuration
│ ├── commands/ # Command documentation
│ ├── guide/ # Getting started guides
│ ├── tools/ # Tools and techniques
│ ├── cheatsheet.md # Complete command reference
│ └── index.md # Home page
├── .github/
│ └── workflows/
│ └── deploy.yml # GitHub Pages deployment
└── package.json
This project automatically deploys to GitHub Pages when changes are pushed to the master branch.
-
Enable GitHub Pages:
- Go to your repository Settings
- Navigate to Pages section
- Under Source, select GitHub Actions
-
Push to master:
git add . git commit -m "Deploy VitePress site" git push origin master
-
Access your site:
- Your site will be available at:
https://xabirhasan.github.io/git/ - The workflow will automatically build and deploy on every push to master
- Your site will be available at:
To build locally:
npm run docs:buildThe built files will be in docs/.vitepress/dist
Visit the live documentation for detailed guides on:
- What is Git
- Getting Started
- Git Status
- Git Log
- Git Commit
- Git Cherry-Pick
- Git Branch
- Git Stash
- Patches
- Git Tag
- Git Reset
- Git Revert
- Git Rebase
- Git Bisect
- Git Reflog
Contributions are welcome! Feel free to:
- Report bugs
- Suggest new features
- Improve documentation
- Fix typos
This project is dual-licensed:
- Code/Software: MIT License
- Documentation: Creative Commons Attribution-ShareAlike 4.0 International License
Abir Hasan
- GitHub: @XAbirHasan
Thanks to everyone who has contributed to making this guide better!
Built with VitePress 💚