{"id":15007972,"url":"https://github.com/fabianroy/git-commands","last_synced_at":"2026-04-02T01:58:40.496Z","repository":{"id":257260889,"uuid":"857759865","full_name":"fabianroy/git-commands","owner":"fabianroy","description":"List of all basic git commands","archived":false,"fork":false,"pushed_at":"2025-02-16T19:13:19.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-16T20:23:31.831Z","etag":null,"topics":["git","git-commands"],"latest_commit_sha":null,"homepage":"","language":null,"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/fabianroy.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-09-15T14:41:36.000Z","updated_at":"2025-02-16T19:13:22.000Z","dependencies_parsed_at":"2024-09-15T15:57:57.372Z","dependency_job_id":"76d0acca-f0b0-4f78-a822-a2f761c6a6c9","html_url":"https://github.com/fabianroy/git-commands","commit_stats":null,"previous_names":["fabianroy/git-commands"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabianroy%2Fgit-commands","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabianroy%2Fgit-commands/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabianroy%2Fgit-commands/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabianroy%2Fgit-commands/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabianroy","download_url":"https://codeload.github.com/fabianroy/git-commands/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243180529,"owners_count":20249296,"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","git-commands"],"created_at":"2024-09-24T19:14:41.428Z","updated_at":"2025-12-26T05:24:33.140Z","avatar_url":"https://github.com/fabianroy.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"Certainly! Here’s a list of common Git commands explained in plain text:\n\n### **Basic Git Commands**\n\n- **Initialize a New Repository:** \n  - `git init`  \n  Initializes a new Git repository in your project directory.\n\n- **Clone a Repository:** \n  - `git clone \u003crepository-url\u003e`  \n  Creates a copy of an existing repository from a URL.\n\n- **Clone a Specefic Branch**\n  - `git clone -b \u003cbranch\u003e \u003cremote_repo\u003e`\n\n- **Check Repository Status:** \n  - `git status`  \n  Shows the status of files in the working directory and staging area.\n\n- **Add Files to Staging Area:** \n  - `git add \u003cfile\u003e`  \n  Adds a specific file to the staging area.\n\n  - `git add .`  \n  Adds all changed files in the current directory to the staging area.\n\n- **Commit Changes:** \n  - `git commit -m \"Commit message\"`  \n  Commits the staged changes with a descriptive message.\n\n- **View Commit History:** \n  - `git log`  \n  Shows the commit history of the repository.\n\n- **Show Changes Between Commits:** \n  - `git diff`  \n  Displays the differences between changes.\n\n### **Branching and Merging**\n\n- **List Branches:** \n  - `git branch`  \n  Lists all branches in the repository.\n\n- **Create a New Branch:** \n  - `git branch \u003cbranch-name\u003e`  \n  Creates a new branch.\n\n- **Switch Branches:** \n  - `git checkout \u003cbranch-name\u003e`  \n  Switches to the specified branch.\n\n- **Create and Switch to a New Branch:** \n  - `git checkout -b \u003cbranch-name\u003e`  \n  Creates and switches to a new branch in one step.\n\n- **Merge a Branch into Current Branch:** \n  - `git merge \u003cbranch-name\u003e`  \n  Merges changes from the specified branch into the current branch.\n\n- **Delete a Branch:** \n  - `git branch -d \u003cbranch-name\u003e`  \n  Deletes the specified branch.\n\n### **Remote Repositories**\n\n- **Add a Remote Repository:** \n  - `git remote add origin \u003crepository-url\u003e`  \n  Adds a remote repository with the name \"origin\".\n\n- **View Remote Repositories:** \n  - `git remote -v`  \n  Lists the remote repositories and their URLs.\n\n- **Fetch Changes from Remote:** \n  - `git fetch`  \n  Retrieves new changes from the remote repository without applying them.\n\n- **Pull Changes from Remote:** \n  - `git pull`  \n  Fetches and merges changes from the remote repository.\n\n- **Push Changes to Remote:** \n  - `git push`  \n  Uploads local changes to the remote repository.\n\n- **Remove a Remote Repository:** \n  - `git remote remove origin`  \n  Removes the remote repository named \"origin\".\n\n### **Stashing and Unstashing**\n\n- **Stash Changes:** \n  - `git stash`  \n  Saves uncommitted changes temporarily and clears the working directory.\n\n- **List Stashes:** \n  - `git stash list`  \n  Lists all stashed changes.\n\n- **Apply a Stash:** \n  - `git stash apply`  \n  Applies the most recent stash to the working directory.\n\n- **Drop a Stash:** \n  - `git stash drop`  \n  Deletes a stash from the stash list.\n\n### **Undoing Changes**\n\n- **Unstage a File:** \n  - `git reset \u003cfile\u003e`  \n  Removes a file from the staging area.\n\n- **Discard Changes in Working Directory:** \n  - `git checkout -- \u003cfile\u003e`  \n  Discards changes in the working directory for a specific file.\n\n- **Revert a Commit:** \n  - `git revert \u003ccommit-id\u003e`  \n  Creates a new commit that undoes the changes made by a previous commit.\n\n- **Reset to a Previous Commit:** \n  - `git reset --hard \u003ccommit-id\u003e`  \n  Resets the working directory and staging area to a previous commit, discarding all changes.\n\n### **Configuration and Info**\n\n- **View Git Configuration:** \n  - `git config --list`  \n  Displays the current Git configuration settings.\n\n- **Set User Name and Email:** \n  - `git config --global user.name \"Your Name\"`  \n  Sets the global username for commits.\n\n  - `git config --global user.email \"your-email@example.com\"`  \n  Sets the global email for commits.\n\n- **Show Git Status for a File:** \n  - `git ls-files`  \n  Lists all files currently tracked by Git.\n\n### To Uninit A Repo From Git\n- `rmdir /S /Q .git`\n- `Remove-Item -Recurse -Force .git`\n\nThese commands should help you perform a wide range of Git operations effectively.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabianroy%2Fgit-commands","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabianroy%2Fgit-commands","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabianroy%2Fgit-commands/lists"}