{"id":18644793,"url":"https://github.com/sudhilraj/git-tutorial","last_synced_at":"2026-04-18T10:34:32.355Z","repository":{"id":114721876,"uuid":"421732844","full_name":"SudhilRaj/Git-tutorial","owner":"SudhilRaj","description":"Git beginners tutorial","archived":false,"fork":false,"pushed_at":"2024-04-30T11:54:54.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-27T11:31:01.314Z","etag":null,"topics":["git","github","github-config"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/SudhilRaj.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":"2021-10-27T08:16:00.000Z","updated_at":"2024-04-30T11:54:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"ce0ad7ea-d373-4d97-8d70-94899e4ae700","html_url":"https://github.com/SudhilRaj/Git-tutorial","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SudhilRaj%2FGit-tutorial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SudhilRaj%2FGit-tutorial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SudhilRaj%2FGit-tutorial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SudhilRaj%2FGit-tutorial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SudhilRaj","download_url":"https://codeload.github.com/SudhilRaj/Git-tutorial/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239449544,"owners_count":19640532,"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","github-config"],"created_at":"2024-11-07T06:13:40.383Z","updated_at":"2025-10-25T18:15:35.708Z","avatar_url":"https://github.com/SudhilRaj.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Learn Git\nThis is just a study repository for a beginner in Git. \nYou can check the 'Git-commands.txt' file for all the basic commands and initial setup.\n\n## Git Basic commands and setup\n- Install git/git-bash\n\n- Create project directory - We can create files directly inside the repository if we want.\nEg: touch index.html, touch app.js, touch .gitignore, touch README.md\n\n- The files or directories added in the .gitignore file will not get tracked\n\n- git init (This will add a hidden .git folder inside directory) \n\n### configuration\n- git config --global user.name 'Sudhil'\n- git config --global user.email 'email@gamil.com'\n\n### git status\n- Run anytime if we want to know the status of the git tree\n\n### git add .\n- Add all the modified files\n\n### git add index.html\n- This will only the index.html file\n\n### git rm --cache index.html\n- Untrack the tracked file\n\n### git commit -m 'commit message'\n- Commit the staged changes after adding files with a message\n\n### git log\n- To view all the previous commits\n\n### git branch branch-name\n- Create a new branch with branch-name\n\n### git checkout branch-name\n- To switch between branches\n\n### git checkout -b branch-name\n- This will create a new branch switch to it together\n\n### git merge branch-name\n- This will merge the changes made in one branch to another. For eg. if we are in master branch and run the above command, the branch-name will gets merged to master branch\n\n\n## Remote Repo - Adding/ Pushing the existing local repository to a new remote repository\n* Create a repo in GitHub - (Add name and description)\n\n### git remote add origin repo-url (will get 'repo-url' from GitHub)\n- This will help us to link our local repository to a remote repository in GitHub\n- Make sure the root branch name is same in both local and remote (Eg:master or main), Otherwise rename it.\n\n### git push -u origin master\n- This will push the master branch from local repository to remote repository in GitHub\n\n### Add a README.md file \n- We can add directly from GitHub or we can add in local and then push\n\n### git pull origin master\n- Pull/Retrieve the latest changes added in the remote repository to local repository(Eg: To get changes from an other developer)\n\n### git pull origin master --rebase\n- This is same as pulling but merge our local master along with the remote master while pulling\n\n## Clone an existing remote repo\n- git clone repo-url\n\n\nOnce you are familiar with all these basic commands, you can use GUI or the awesome extensions in the IDE (Eg: Extensions like Git History, Git Blame, Git Lens, etc in VS code)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsudhilraj%2Fgit-tutorial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsudhilraj%2Fgit-tutorial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsudhilraj%2Fgit-tutorial/lists"}