{"id":18493610,"url":"https://github.com/aswinbarath/master-git","last_synced_at":"2026-05-14T12:37:50.525Z","repository":{"id":117712549,"uuid":"404253791","full_name":"AswinBarath/Master-Git","owner":"AswinBarath","description":"Master the concepts of Git with me through a set of tutorials","archived":false,"fork":false,"pushed_at":"2021-10-09T10:48:07.000Z","size":9698,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-05T21:40:44.773Z","etag":null,"topics":["git","github"],"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/AswinBarath.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":"2021-09-08T07:33:10.000Z","updated_at":"2021-12-29T05:52:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"93309914-6975-4648-ade1-0868e953d276","html_url":"https://github.com/AswinBarath/Master-Git","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AswinBarath/Master-Git","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AswinBarath%2FMaster-Git","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AswinBarath%2FMaster-Git/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AswinBarath%2FMaster-Git/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AswinBarath%2FMaster-Git/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AswinBarath","download_url":"https://codeload.github.com/AswinBarath/Master-Git/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AswinBarath%2FMaster-Git/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274922940,"owners_count":25374579,"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","status":"online","status_checked_at":"2025-09-13T02:00:10.085Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","github"],"created_at":"2024-11-06T13:15:25.288Z","updated_at":"2026-05-14T12:37:50.466Z","avatar_url":"https://github.com/AswinBarath.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Master Git\n\nMaster the concepts of Git with me through a set of tutorials\n\n\n---\n\n\n## What is Git ?\n\n- Distributed Version Control System\n\n\n## What is GitHub ?\n\n- A GUI for hosting the Git folders/repositories/projects online to share, collaborate and contribute from around the world\n- Other Platforms: BitBucket, GitLab\n\n---\n\n\n## Why are we using Git and GitHub?\n\n- Maintaining the history of the project versions\n- To track changes made by each person\n- Share the project around the world\n\n\n---\n\n\n## Download Git\n\n- [Git for macOS, Windows, Linux/Unix](https://git-scm.com/downloads)\n\n\n---\n\n\n## Basic Linux commands\n\n- `ls`\n\t- Lists all the files and folders at present directory\n- `ls -a`\n\t- Lists all the hidden files and folders as well\n- `ls .git`\n\t- Lists all the files and folders inside `.git` folder\n- `mkdir project`\n\t- Create a folder named *project*\n- `cd project`\n\t- Changes directory to *project* folder\n- `touch names.txt`\n\t- Create a file named *touch.txt*\n- `vi names.txt`\n\t- Opens the vim editor for names.txt file\n- `cat names.txt`\n\t- Displays all the content in names.txt file\n- `rm -rf names.txt`\n\t- Deletes the *names.txt* file\n\n---\n\n\n## Where does Git store information ?\n\n- The information like history, versions and so on are stored in another folder that git provides us.\n- This is known the git repository\n- This folder is named *.git*\n- In Linux file systems, the folders preceded with `.` are hidden\n\n\n---\n\n\n## How does Git store information ?\n\n- At its core, git is like a key value store.\n- The Value = Data\n- The Key = Hash of the Data\n- You can use the key to retrieve the content.\n\n---\n\n\n## Git Commands\n\n- `git init`\n\t- Initializes empty git repository in the current working directory\n- `git status`\n\t- Know more about the changes made in the project\n- `git add names.txt`\n\t- Adds *names.txt* file to the staging area\n- `git add .`\n\t- Add all of the files in the staging area\n\t- `.` means add all of the files/folders\n- `git commit -m \"names.txt file added\"`\n\t- Commit all the files \n\t- `-m` means to provide a message to the commit\n- `git restore --staged names.txt`\n\t- Restores the changes made since previous commit from the staging area\n- `git log`\n\t- Displays the entire history of commits\n- `git reset` **[hash value of the commit]**\n\t- Removing a commit from the history of a project\n- `git stash`\n\t- Save the progress somewhere else *(like a backstage)* and make the present working directory clean\n- `git stash pop`\n\t- Bring back the changes saved *(from backstage)*\n- `git stash clean`\n\t- Just deletes all the changes saved *(from backstage)*\n- `git remote add origin ` **[GitHub Repository URL]**\n\t- Attach local *Git* project to *GitHub* Repository\n- `git push origin main`\n\t- Share the changes from local project to remote repository\n\n\n--- \n\n\n## Analogy to understand Git\n\n- Consider a scenario of a wedding\n\t- 1 The Guests go the stage\n\t- 2 Photographer takes their picture with the couple\n\t- 3 The photos are saved in a wedding album\n- Now, assume that the guests who have not taken their picture with couple yet as the **Untracked files**\n- 1 Hence we take their picture by bringing them to stage =\u003e The untracked files are added to the staging area\n- Now, we need to permanently save the picture in history\n- 2 Hence the photographer takes their picture with the couple =\u003e The staged files \n\n\n\n## Resources\n\n- [Learn Branching in Git in an Interactive way](https://learngitbranching.js.org/)\n\n- [Complete Git and GitHub Tutorial](https://youtu.be/apGV9Kg7ics) by Kunal Kushwaha \u003chttps://github.com/kunal-kushwaha\u003e\n\n- [Front end Masters - Git in-depth](https://frontendmasters.com/courses/git-in-depth/) by Nina Zakharenko \u003chttps://github.com/nnja\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faswinbarath%2Fmaster-git","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faswinbarath%2Fmaster-git","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faswinbarath%2Fmaster-git/lists"}