{"id":27320238,"url":"https://github.com/umarilly/git-and-github-learning","last_synced_at":"2026-04-29T23:03:42.643Z","repository":{"id":258394081,"uuid":"873826526","full_name":"umarilly/git-and-github-learning","owner":"umarilly","description":"A beginner-friendly Git-Learning repository designed to help you understand the basics of Git and GitHub. It covers essential commands, workflows, branching, merging, and collaboration tips. Perfect for students and developers looking to master version control through hands-on practice.","archived":false,"fork":false,"pushed_at":"2025-04-07T22:46:17.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T09:14:47.288Z","etag":null,"topics":["git","github"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/umarilly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-16T19:34:30.000Z","updated_at":"2025-04-07T22:46:21.000Z","dependencies_parsed_at":"2025-02-09T22:31:06.427Z","dependency_job_id":null,"html_url":"https://github.com/umarilly/git-and-github-learning","commit_stats":null,"previous_names":["umarilly/git-learning","umarilly/git-and-github-learning"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umarilly%2Fgit-and-github-learning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umarilly%2Fgit-and-github-learning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umarilly%2Fgit-and-github-learning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umarilly%2Fgit-and-github-learning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/umarilly","download_url":"https://codeload.github.com/umarilly/git-and-github-learning/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248543839,"owners_count":21121838,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git","github"],"created_at":"2025-04-12T09:14:55.009Z","updated_at":"2026-04-29T23:03:42.580Z","avatar_url":"https://github.com/umarilly.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 Git and GitHub Learning\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://git-scm.com/images/logos/downloads/Git-Logo-2Color.png\" alt=\"Git Logo\" width=\"200\"/\u003e\n  \u003cbr\u003e\n  \u003cem\u003eA comprehensive guide to mastering Git and GitHub\u003c/em\u003e\n\u003c/div\u003e\n\n## 📋 Table of Contents\n- [Introduction](#-introduction)\n- [Prerequisites](#-prerequisites)\n- [Beginner Topics](#-beginner-topics)\n- [Intermediate Topics](#-intermediate-topics)\n- [Advanced Topics](#-advanced-topics)\n- [Best Practices](#-best-practices)\n- [Resources](#-resources)\n\n## 🌟 Introduction\nThis repository serves as a comprehensive guide for learning Git and GitHub, from basic concepts to advanced techniques. Whether you're a complete beginner or an experienced developer looking to enhance your version control skills, this resource will help you master Git and GitHub effectively.\n\n### 🎯 What You'll Learn\n- **Core Git Concepts**: Understand the fundamentals of version control\n- **Command Mastery**: Learn essential Git commands and their applications\n- **Collaboration**: Master GitHub workflows for team projects\n- **Advanced Techniques**: Explore powerful Git features for complex scenarios\n- **CI/CD Integration**: Learn to automate workflows with GitHub Actions\n\n## 🔧 Prerequisites\nBefore diving into this repository, ensure you have:\n\n- **Command Line Basics**: Familiarity with terminal/command prompt\n- **Text Editor**: VS Code, Sublime Text, or any preferred editor\n- **Git Installation**: [Download Git](https://git-scm.com/downloads)\n- **GitHub Account**: [Sign up for GitHub](https://github.com/signup)\n\n## 📚 Beginner Topics\n\n### 1. Introduction to Git\n- **What is Git?**: A distributed version control system that tracks changes in source code\n- **Why Use Git?**: Enables collaboration, history tracking, and code management\n- **Basic Concepts**: Repository, commit, branch, and working directory\n\n### 2. Installing Git\n- **Windows**: Download and run the installer from git-scm.com\n- **macOS**: Use Homebrew: `brew install git`\n- **Linux**: Use package manager: `sudo apt install git` (Ubuntu/Debian)\n- **Verification**: Run `git --version` to confirm installation\n\n### 3. Git Configuration\n```bash\n# Set your name\ngit config --global user.name \"Your Name\"\n\n# Set your email\ngit config --global user.email \"your.email@example.com\"\n\n# Set default editor\ngit config --global core.editor \"code --wait\"\n```\n\n### 4. Basic Commands\n- **`git init`**: Initialize a new Git repository\n  ```bash\n  git init\n  ```\n  Creates a new `.git` directory in your project\n\n- **`git add`**: Stage changes for commit\n  ```bash\n  git add .              # Stage all changes\n  git add filename.txt   # Stage specific file\n  ```\n\n- **`git commit`**: Save staged changes\n  ```bash\n  git commit -m \"Your commit message\"\n  ```\n  Creates a new commit with your changes\n\n- **`git status`**: Check repository status\n  ```bash\n  git status\n  ```\n  Shows modified files and staging status\n\n- **`git log`**: View commit history\n  ```bash\n  git log               # Basic log\n  git log --oneline    # Compact log\n  git log --graph      # Visual branch history\n  ```\n\n### 5. Working with Repositories\n- **Creating Repositories**:\n  ```bash\n  # Local repository\n  git init\n  \n  # GitHub repository\n  # Create on GitHub.com, then:\n  git remote add origin https://github.com/username/repo.git\n  ```\n\n- **Cloning Repositories**:\n  ```bash\n  git clone https://github.com/username/repo.git\n  ```\n\n### 6. Undoing Changes\n- **`git checkout`**: Discard changes\n  ```bash\n  git checkout -- filename.txt\n  ```\n\n- **`git reset`**: Unstage changes\n  ```bash\n  git reset HEAD filename.txt\n  ```\n\n- **`git commit --amend`**: Fix last commit\n  ```bash\n  git commit --amend -m \"New commit message\"\n  ```\n\n- **`.gitignore`**: Exclude files\n  ```bash\n  # Example .gitignore\n  node_modules/\n  .env\n  *.log\n  ```\n\n## 📖 Intermediate Topics\n\n### 1. Branching and Merging\n- **Creating Branches**:\n  ```bash\n  git branch feature-branch    # Create branch\n  git checkout feature-branch  # Switch to branch\n  git checkout -b feature-branch  # Create and switch\n  ```\n\n- **Merging**:\n  ```bash\n  git checkout main\n  git merge feature-branch\n  ```\n\n- **Resolving Conflicts**:\n  1. Edit conflicted files\n  2. Stage resolved files\n  3. Complete merge with `git commit`\n\n### 2. Remote Operations\n- **`git push`**: Send changes to remote\n  ```bash\n  git push origin main\n  ```\n\n- **`git pull`**: Fetch and merge\n  ```bash\n  git pull origin main\n  ```\n\n- **`git fetch`**: Get remote changes\n  ```bash\n  git fetch origin\n  ```\n\n### 3. Collaboration Features\n- **Forking**: Create personal copy of repository\n- **Pull Requests**: Propose changes to original repository\n- **Code Review**: Review and discuss changes\n\n### 4. Advanced Commands\n- **`git stash`**: Save changes temporarily\n  ```bash\n  git stash save \"Work in progress\"\n  git stash pop\n  ```\n\n- **`git tag`**: Mark important points\n  ```bash\n  git tag v1.0.0\n  git push --tags\n  ```\n\n## 🚀 Advanced Topics\n\n### 1. Git Workflows\n- **Git Flow**: Feature branches, develop, release branches\n- **GitHub Flow**: Simple branch-based workflow\n- **Trunk-Based Development**: Short-lived feature branches\n\n### 2. Advanced Techniques\n- **`git rebase`**: Rewrite commit history\n  ```bash\n  git rebase main\n  ```\n\n- **`git cherry-pick`**: Apply specific commits\n  ```bash\n  git cherry-pick commit-hash\n  ```\n\n- **Git Hooks**: Automate tasks\n  ```bash\n  # Example pre-commit hook\n  #!/bin/sh\n  npm test\n  ```\n\n### 3. Repository Management\n- **Submodules**: Include other repositories\n  ```bash\n  git submodule add https://github.com/user/repo.git\n  ```\n\n- **LFS**: Handle large files\n  ```bash\n  git lfs track \"*.psd\"\n  ```\n\n## 💡 Best Practices\n\n### 1. Commit Messages\n- Use imperative mood: \"Add feature\" not \"Added feature\"\n- Keep first line under 50 characters\n- Include detailed description if needed\n\n### 2. Branch Naming\n- `feature/`: New features\n- `bugfix/`: Bug fixes\n- `hotfix/`: Urgent fixes\n- `release/`: Release preparation\n\n### 3. Collaboration\n- Regular updates from main branch\n- Clear pull request descriptions\n- Code review guidelines\n\n## 📚 Resources\n\n### Documentation\n- [Official Git Documentation](https://git-scm.com/doc)\n- [GitHub Docs](https://docs.github.com)\n- [GitHub Flow Guide](https://guides.github.com/introduction/flow/)\n\n### Learning Materials\n- [GitHub Learning Lab](https://lab.github.com)\n- [GitHub Skills](https://skills.github.com)\n- [Atlassian Git Tutorial](https://www.atlassian.com/git/tutorials)\n\n### Cheat Sheets\n- [Git Cheat Sheet](https://education.github.com/git-cheat-sheet-education.pdf)\n- [GitHub Flow Cheat Sheet](https://guides.github.com/introduction/flow/)\n\n---\n\n\u003cdiv align=\"center\"\u003e\n  \u003cp\u003eMade with ❤️ by \u003ca href=\"https://github.com/umarilly\"\u003eMuhammad Umar\u003c/a\u003e for the developer community\u003c/p\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumarilly%2Fgit-and-github-learning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fumarilly%2Fgit-and-github-learning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumarilly%2Fgit-and-github-learning/lists"}