{"id":27154530,"url":"https://github.com/ar-sayeem/cd-lab","last_synced_at":"2026-04-26T22:31:49.415Z","repository":{"id":273329533,"uuid":"919329414","full_name":"ar-sayeem/CD-Lab","owner":"ar-sayeem","description":"I will upload my weekly works that I learned in the course Compiler Design Lab","archived":false,"fork":false,"pushed_at":"2025-03-17T16:49:13.000Z","size":30,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-17T17:45:26.279Z","etag":null,"topics":["c","compiler-design","git"],"latest_commit_sha":null,"homepage":"","language":"C","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/ar-sayeem.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":"2025-01-20T07:37:42.000Z","updated_at":"2025-03-17T16:49:17.000Z","dependencies_parsed_at":"2025-01-20T09:24:18.010Z","dependency_job_id":"9dda7a43-15c5-4199-a1de-549443852819","html_url":"https://github.com/ar-sayeem/CD-Lab","commit_stats":null,"previous_names":["ar-sayeem/compiler-design-course","ar-sayeem/cd-lab"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ar-sayeem%2FCD-Lab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ar-sayeem%2FCD-Lab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ar-sayeem%2FCD-Lab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ar-sayeem%2FCD-Lab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ar-sayeem","download_url":"https://codeload.github.com/ar-sayeem/CD-Lab/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247894707,"owners_count":21014157,"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":["c","compiler-design","git"],"created_at":"2025-04-08T17:36:15.810Z","updated_at":"2026-04-26T22:31:49.403Z","avatar_url":"https://github.com/ar-sayeem.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Git Bash Command Cheat Sheet\n\n## Table of Contents\n- [Part 1: Basic Terminal Commands](#part-1-basic-terminal-commands)\n- [Part 2: File Editing with Vi](#part-2-file-editing-with-vi)\n- [Part 3: Git-Specific Commands](#part-3-git-specific-commands)\n- [Part 4: Advanced Git Commands](#part-4-advanced-git-commands)\n- [Part 5: Miscellaneous Commands](#part-5-miscellaneous-commands)\n\n---\n\n## Part 1: Basic Terminal Commands\n\n| Command                         | Description                                   |\n|---------------------------------|-----------------------------------------------|\n| `git --version`                 | Shows the installed Git version.              |\n| `pwd`                           | Displays the current working directory.       |\n| `ls`                            | Lists files and directories in the current directory. |\n| `ls -l`                         | Displays detailed information about files and directories. |\n| `ls -a`                         | Lists all files, including hidden files.      |\n| `ls -al`                        | Lists all files and directories with details, including hidden ones. |\n| `clear`                         | Clears the terminal screen.                   |\n| `cd \u003cdirectory\u003e`                | Changes the current directory to `\u003cdirectory\u003e`. |\n| `cd ..`                         | Moves one level up in the directory structure. |\n| `mkdir \u003cname\u003e`                  | Creates a new directory named `\u003cname\u003e`.       |\n| `rm \u003cfile\u003e`                     | Deletes a file.                               |\n| `rm -r \u003cdirectory\u003e`             | Deletes a directory and its contents.         |\n| `touch \u003cfile\u003e`                  | Creates an empty file named `\u003cfile\u003e`.         |\n| `mv \u003csource\u003e \u003cdestination\u003e`     | Moves or renames files or directories.       |\n| `mv -i \u003csource\u003e \u003cdestination\u003e`  | Moves files with confirmation for overwriting. |\n| `cp \u003csource\u003e \u003cdestination\u003e`     | Copies files or directories.                 |\n| `cat \u003cfile\u003e`                    | Displays the contents of a file.              |\n| `echo \"\u003ctext\u003e\" \u003e \u003cfile\u003e`        | Writes `\u003ctext\u003e` to `\u003cfile\u003e`.                  |\n| `history`                       | Shows a list of previously used commands.     |\n| `explorer`                      | Opens the current directory in File Explorer. |\n\n---\n\n## Part 2: File Editing with Vi\n\n| Command                              | Description                                          |\n|--------------------------------------|------------------------------------------------------|\n| `vi \u003cfile\u003e`                         | Opens `\u003cfile\u003e` in the Vi editor. Creates the file if it doesn't exist. |\n| `i`                                  | Switch to Insert Mode to type or edit.               |\n| `Esc`                                | Exit Insert Mode.                                    |\n| `:w`                                 | Save changes.                                        |\n| `:q`                                 | Exit the editor.                                     |\n| `:wq`                                | Save and exit.                                       |\n| `:q!`                                | Exit without saving.                                 |\n| **Instruction**                      | After writing text, press `Esc` to enter command mode, then type the command (e.g., `:wq`, `:q!`, `:w!`) and press `Enter`. |\n| `echo \"Your text here\" \u003e new-file.txt` | Creates a new text file with content.               |\n\n---\n\n## Part 3: Git-Specific Commands\n\n| Command                              | Description                                          |\n|--------------------------------------|------------------------------------------------------|\n| `git init`                           | Initializes a new Git repository.                    |\n| `git clone \u003cURL\u003e`                    | Clones a remote repository to your local machine.    |\n| `git status`                         | Shows the status of changes in the working directory.|\n| `git add \u003cfile\u003e`                     | Stages a file for commit.                            |\n| `git add .`                          | Stages all changes in the current directory.         |\n| `git commit -m \"\u003cmessage\u003e\"`          | Commits staged changes with a message.               |\n| `git log`                            | Displays the commit history.                         |\n| `git log --oneline`                  | Simplifies the commit history.                       |\n| `git branch`                         | Lists branches in the repository.                    |\n| `git branch \u003cname\u003e`                  | Creates a new branch named `\u003cname\u003e`.                  |\n| `git checkout \u003cbranch\u003e`              | Switches to a specific branch.                       |\n| `git checkout -b \u003cbranch-name\u003e`      | Creates and switches to a new branch.                |\n| `git merge \u003cbranch\u003e`                 | Merges `\u003cbranch\u003e` into the current branch.           |\n| `git pull`                           | Fetches and merges changes from the remote repository.|\n| `git push`                           | Pushes local changes to the remote repository.       |\n| `git branch -a`                      | Lists all local and remote branches in the repository. |\n\n---\n\n## Part 4: Advanced Git Commands\n\n| Command                                | Description                                           |\n|----------------------------------------|-------------------------------------------------------|\n| `git reset --hard`                     | Resets the working directory to the last commit.      |\n| `git revert \u003ccommit\u003e`                  | Reverts a specific commit by creating a new one.      |\n| `git stash`                            | Temporarily saves uncommitted changes.                |\n| `git stash pop`                        | Restores stashed changes.                             |\n| `git rebase \u003cbranch\u003e`                  | Reapplies commits on top of another branch.           |\n| `git cherry-pick \u003ccommit\u003e`             | Applies a specific commit from another branch.        |\n| `git diff`                             | Displays changes not staged for commit.               |\n| `git diff --staged`                    | Displays changes staged for commit.                   |\n| `git show \u003ccommit\u003e`                    | Displays detailed information about a specific commit, including changes made, author, date, and commit message. |\n\n---\n\n## Part 5: Miscellaneous Commands\n\n| Command                             | Description                                           |\n|-------------------------------------|-------------------------------------------------------|\n| `whoami`                            | Displays the current logged-in user.                   |\n| `uname -a`                          | Displays system information.                          |\n| `date`                              | Prints the current date and time.                     |\n| `man \u003ccommand\u003e`                     | Opens the manual for a specific command.              |\n| `alias ll='ls -la'`                 | Creates a shortcut (`ll`) for `ls -la`.               |\n| `unalias \u003calias\u003e`                   | Removes an alias.                                     |\n| `ssh \u003cuser\u003e@\u003chost\u003e`                 | Connects to a remote server via SSH.                  |\n| `scp \u003csource\u003e \u003cuser\u003e@\u003chost\u003e:\u003cdestination\u003e` | Securely copies files to a remote server.             |\n\n---\n\n## Conclusion\n\nThis cheat sheet provides a comprehensive overview of the most commonly used Git Bash commands, from basic terminal navigation to advanced Git commands. By using this guide, you can enhance your workflow and make the most out of Git Bash.\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Far-sayeem%2Fcd-lab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Far-sayeem%2Fcd-lab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Far-sayeem%2Fcd-lab/lists"}