{"id":25543438,"url":"https://github.com/sundanc/git_intro","last_synced_at":"2026-05-08T04:10:13.931Z","repository":{"id":277750727,"uuid":"933381696","full_name":"sundanc/git_intro","owner":"sundanc","description":"Introduction to essential and beginner friendly git commands.","archived":false,"fork":false,"pushed_at":"2025-02-15T20:21:54.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-01T10:53:47.350Z","etag":null,"topics":["git","git-commands","git-config","github","github-actions","github-config"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sundanc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2025-02-15T20:21:19.000Z","updated_at":"2025-02-15T21:49:29.000Z","dependencies_parsed_at":"2025-02-15T21:34:38.238Z","dependency_job_id":null,"html_url":"https://github.com/sundanc/git_intro","commit_stats":null,"previous_names":["sundanc/git_intro"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sundanc/git_intro","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sundanc%2Fgit_intro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sundanc%2Fgit_intro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sundanc%2Fgit_intro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sundanc%2Fgit_intro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sundanc","download_url":"https://codeload.github.com/sundanc/git_intro/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sundanc%2Fgit_intro/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32766206,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T02:36:36.067Z","status":"ssl_error","status_checked_at":"2026-05-08T02:36:07.210Z","response_time":54,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","git-commands","git-config","github","github-actions","github-config"],"created_at":"2025-02-20T07:19:19.336Z","updated_at":"2026-05-08T04:10:13.867Z","avatar_url":"https://github.com/sundanc.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Git Commands Reference Guide\n\n## Basic Configuration\n\n```bash\n# Configure Git globally\ngit config --global user.name \"Your Username\"\ngit config --global user.email \"your.email@example.com\"\ngit config --global core.editor \"code --wait\"  # Set VS Code as default editor\n```\n\n## Repository Setup\n\n```bash\n# Initialize new repository\nmkdir repo-name\ncd repo-name\ngit init\n\n# Create initial README\necho \"# repo-name\" \u003e\u003e README.md\n```\n\n## Basic Operations\n\n```bash\n# Stage changes\ngit add .                    # Stage all changes\ngit add \u003cfile1\u003e \u003cfile2\u003e     # Stage specific files\ngit add -p                   # Stage changes interactively\n\n# Commit changes\ngit commit -m \"Commit message\"\ngit commit -am \"Commit message\"  # Stage tracked files and commit\n\n# Status and history\ngit status                   # Check repository status\ngit log                      # View commit history\ngit log --oneline           # Compact history view\ngit diff                    # View unstaged changes\ngit diff --staged           # View staged changes\n```\n\n## Remote Operations\n\n```bash\n# GitHub CLI operations\ngh auth login               # Login to GitHub\ngh repo create repo-name --public  # Create public repository\n\n# Remote repository setup\ngit remote add origin https://github.com/username/repo-name.git\ngit remote -v              # View remote repositories\ngit branch -M main        # Rename current branch to main\ngit push -u origin main   # Push to remote with upstream tracking\n\n# Fetch and pull\ngit fetch origin          # Download objects and refs\ngit pull origin main      # Fetch and merge changes\ngit clone \u003crepository-url\u003e  # Clone existing repository\n```\n\n## Branch Management\n\n```bash\n# View branches\ngit branch                  # List local branches\ngit branch -a              # List all branches including remote\ngit branch --show-current  # Show current branch name\n\n# Branch operations\ngit checkout \u003cbranch-name\u003e     # Switch branches\ngit checkout -b \u003cbranch-name\u003e  # Create and switch to new branch\ngit branch -d \u003cbranch-name\u003e    # Delete local branch\ngit push origin --delete \u003cbranch-name\u003e  # Delete remote branch\ngit merge \u003cbranch-name\u003e        # Merge branch into current\ngit merge --abort             # Abort merge in case of conflicts\n```\n\n## Undo Operations\n\n```bash\n# Undo changes\ngit reset --soft HEAD~1     # Undo last commit, keep changes staged\ngit reset --mixed HEAD~1    # Undo last commit, keep changes unstaged\ngit reset --hard HEAD~1     # Undo last commit, discard changes\ngit revert \u003ccommit-hash\u003e    # Create new commit that undoes changes\ngit checkout -- \u003cfile\u003e      # Discard changes in working directory\ngit clean -fd              # Remove untracked files and directories\n```\n\n## Stashing\n\n```bash\n# Stash operations\ngit stash                           # Quick stash\ngit stash save \"message\"           # Stash with message\ngit stash list                     # List all stashes\ngit stash show                     # Show stash contents\ngit stash apply                    # Apply most recent stash\ngit stash apply stash@{n}         # Apply specific stash\ngit stash drop                     # Remove most recent stash\ngit stash clear                    # Remove all stashes\n```\n\n## Advanced Inspection\n\n```bash\n# Detailed inspection\ngit show \u003ccommit\u003e           # Show commit details\ngit blame \u003cfile\u003e           # Show who changed what\ngit reflog                 # View reference logs\ngit log --graph --oneline  # Show branch graph\ngit bisect start          # Binary search for bugs\n```\n\n## Submodules\n\n```bash\n# Submodule operations\ngit submodule add \u003curl\u003e \u003cpath\u003e   # Add submodule\ngit submodule init              # Initialize submodules\ngit submodule update           # Update submodules\ngit submodule update --init --recursive  # Initialize and update recursively\n```\n\n## Aliases\n\n```bash\n# Create aliases\ngit config --global alias.co checkout\ngit config --global alias.br branch\ngit config --global alias.ci commit\ngit config --global alias.st status\ngit config --global alias.unstage 'reset HEAD --'\ngit config --global alias.last 'log -1 HEAD'\n```\n\n## Best Practices\n\n- Write clear, concise commit messages\n- Commit frequently, push regularly\n- Use meaningful branch names\n- Pull before pushing to avoid conflicts\n- Keep main/master branch stable\n- Use `.gitignore` for project-specific exclusions\n- Review changes before committing\n- Create feature branches for new work\n- Delete merged branches to keep repository clean\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsundanc%2Fgit_intro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsundanc%2Fgit_intro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsundanc%2Fgit_intro/lists"}