{"id":21546301,"url":"https://github.com/bharadwajrachakonda/learning-git-and-github","last_synced_at":"2026-05-22T14:12:35.338Z","repository":{"id":257830999,"uuid":"866511396","full_name":"BharadwajRachakonda/Learning-Git-and-GitHub","owner":"BharadwajRachakonda","description":"Today I learnt all there is to git and github","archived":false,"fork":false,"pushed_at":"2024-10-15T15:02:04.000Z","size":93,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-24T09:11:15.801Z","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/BharadwajRachakonda.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-10-02T11:53:45.000Z","updated_at":"2024-10-30T09:40:34.000Z","dependencies_parsed_at":"2024-10-16T16:07:29.579Z","dependency_job_id":"dd5ca15b-5f56-432b-a9f1-f4d07b2683fd","html_url":"https://github.com/BharadwajRachakonda/Learning-Git-and-GitHub","commit_stats":null,"previous_names":["bharadwajrachakonda/learning-git-and-github"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BharadwajRachakonda%2FLearning-Git-and-GitHub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BharadwajRachakonda%2FLearning-Git-and-GitHub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BharadwajRachakonda%2FLearning-Git-and-GitHub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BharadwajRachakonda%2FLearning-Git-and-GitHub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BharadwajRachakonda","download_url":"https://codeload.github.com/BharadwajRachakonda/Learning-Git-and-GitHub/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244135905,"owners_count":20403797,"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"],"created_at":"2024-11-24T06:09:42.211Z","updated_at":"2026-05-22T14:12:35.283Z","avatar_url":"https://github.com/BharadwajRachakonda.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Learning-Git-and-GitHub\n\n### Window’s commands\n\n\u003chr width=\"400px\" align=\"left\"\u003e\n\n- To change directory to somewhere in current driver `cd {directory name}`\n\n- To change directory to somewhere in another driver `cd /d {d:\\programming\\html}`\n\n- To display everything in current directory `dir`\n\n- To make a directory `mkdir`\n\n- To display hidden files in directory `dir /a:h`\n\n- To create a new file `cd . \u003e file.txt`\n\n- To delete a file `rm -rf {file_name}`\n\n### Git commands:\n\n\u003chr width=\"400px\" align=\"left\"\u003e\n\n- To initialize a git repository `git init`\n\n- To display all changes in the repository `git status`\n\n- To stage the changes of all files(to save any changes they must be staged first) `git add .`\n\n  \u003e You know what it is for a particular file\n\n- To save the changes `git commit -m “your text”`\n\n  \u003e -m here refers to message a commit can only happen with a message.\n\n- To check whether the commits are successful try running `git status` again.\n\n- If you staged a change and want to restore previous version `git restore –staged {file_name}`\n\n- To see all modifications made ever `git log`\n\n- If you committed a change and want to move to a previous version, use `git reset {sha code}`\n\n  \u003e You can get the sha code in GitHub or by git log\n\n- If you don’t want to change your files but want to store the changes somewhere else `git stash`\n\n- If you want the changes in stash to come to live `git stash pop`\n\n- If you want to clear all the changes in stash `git stash clear`\n\n- `git remote add {origin} {URL}`\n\n\u003e here `git` means a git command\n\u003e `remote` means you are working with URL’s\n\u003e `add` means you are adding the URL\n\u003e `origin` is used to tell what the name of URL is going to be\n\n- To see all the URL’s attached to your folder `git remote -v`\n\n- To push the repository to GitHub `git push origin master`\n\n\u003e Here `master` is the branch you are pushing and `origin` is the URL you are referring to. It `also commit’s` all changes.\n\n- To create a new empty branch `git branch {branch_name}`\n\n- To move your default branch to some others `git checkout {branch_name}`\n\n- To get commits of other branch after merging `git fetch –all –prune`\n\n\u003e All the `commits` that are made will be done on the `default branch`. The `head` will point to the `default branch.`\n\n\u003e _**Note:**_ Commit after checkout.\n\n- To merge a branch to the default branch `git merge {other_branch}`\n\n- To clone a repository `git clone {URL}`\n\n\u003e After cloning a repository, the original repository URL is known as upstream URL\n\n\u003e **If a branch already has a pull request you cant create another pull requests hence the commit’s will be pushed**\n\n- To force push something `git push origin {brach_name} -f`\n\n\u003e Force commits are done if a reset is made to a previous version.\n\n\u003e _**Note:**_ a proposal to merge a set of changes from one branch into another in a software development project\n\n- Reset main branch of my origin to main branch of upstream `git reset –hard upstream/main`\n\n- Brings modifications in remote repository to local repository with commits `git pull upsteam/main`\n\n- Bring modifications in remote repository to local repository with out commits `git fetch upstream/main`\n\n- To squash multiple commits into one (use pick to show and s to squash) `git rebase -i {sha}`\n\n**_A merge conflict occurs when multiple contributor’s change same line or something similar_**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbharadwajrachakonda%2Flearning-git-and-github","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbharadwajrachakonda%2Flearning-git-and-github","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbharadwajrachakonda%2Flearning-git-and-github/lists"}