{"id":18869313,"url":"https://github.com/codersales/how-to-github-basically","last_synced_at":"2026-02-14T05:30:19.294Z","repository":{"id":213743886,"uuid":"734738024","full_name":"CoderSales/How-To-GitHub-Basically","owner":"CoderSales","description":"How-To-GitHub-Basically","archived":false,"fork":false,"pushed_at":"2024-07-20T20:11:58.000Z","size":107,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-30T23:32:44.534Z","etag":null,"topics":["2023","2023-12","2023-dec","2023-december","2023-q4","documentation","git","git-bash","github","linux","notes","powershell","visual-studio-code","vscode","wimdows","wsl"],"latest_commit_sha":null,"homepage":"","language":null,"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/CoderSales.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":"2023-12-22T13:30:18.000Z","updated_at":"2024-07-20T20:12:02.000Z","dependencies_parsed_at":"2023-12-22T19:29:16.197Z","dependency_job_id":"a21a5651-5187-4a46-a3a0-3585c86803ac","html_url":"https://github.com/CoderSales/How-To-GitHub-Basically","commit_stats":null,"previous_names":["codersales/how-to-github-basically"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoderSales%2FHow-To-GitHub-Basically","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoderSales%2FHow-To-GitHub-Basically/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoderSales%2FHow-To-GitHub-Basically/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoderSales%2FHow-To-GitHub-Basically/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CoderSales","download_url":"https://codeload.github.com/CoderSales/How-To-GitHub-Basically/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239816510,"owners_count":19701753,"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":["2023","2023-12","2023-dec","2023-december","2023-q4","documentation","git","git-bash","github","linux","notes","powershell","visual-studio-code","vscode","wimdows","wsl"],"created_at":"2024-11-08T05:16:26.479Z","updated_at":"2026-02-14T05:30:19.237Z","avatar_url":"https://github.com/CoderSales.png","language":null,"readme":"# How-To-GitHub-Basically\n\n## Description\n\nHow-To-GitHub-Basically\n\n(Assumes Using Windows 11\n\nand\n\nVisual Studio Code)\n\n## Content\n\nPowershell\n\nWindows Subsystem for Linux\n\nIDE (Integrated Development Environment) (Visual Studio Code)\n\ngit bash\n\nGitHub\n\nGoes through simple setup for version control system\n\nGoes through some simple git commands\n\nRefers to some commands which can delete so to be used with caution\n\ntowards the end of this document.\n\nUse at your own risk.\n\n## Purpose\n\nProvide dedicated beginner with a somewhat beginner friendly reference to some \n\ncommon commands and a few issues / workarounds / fixes possibly encountered along the way.\n\nNot suitable for any production or important work just for learning purposes.\n\nWarning: some commands (especially towards the end of document) may not be suitable for all projects, so be very careful!\n\nIntended for very informal reference purposes only and to possibly avoid having to dig through \n\nthe much more extensive, offical git-scm.com documentation, for example.\n\nThis is very much not an official reference in any sense.\n\nErrors and omissions accepted.\n\n## Steps\n\n1. [Go to Windows website to get Powershell](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.4#install-powershell-using-winget-recommended)\n\n2. Download Powershell using commands given: `winget search Microsoft.PowerShell`\n\n3. Add the full absolute path to the folder where `Powershell.exe` is located to `Windows System Environment Variables \u003e Path` by clicking `New`\n\n4. [Click here to go to Windows Subsystem for Linux](https://learn.microsoft.com/en-us/windows/wsl/install)\n\n5. Copy command `wsl --install`\n\n6. Open Powershell\n\n7. Paste Command `wsl --install` into Powershell\n\n8. [Download git bash](https://git-scm.com/downloads)\n\n9. Install git bash\n\n10. Add git bash install folder for git bash to System Environment Variables on Windows\n\n11. [Download an IDE like Visual Studio Code](https://code.visualstudio.com/)\n\n12. Install IDE (e.g. VSCode)\n\n13. Add VSCode folder to System Environment Variables\n\n14. [Go to GitHub](https://github.com/)\n\n15. Sign up for GitHub Account\n\n16. Create new Repository\n\n17. Click Dropdown arrow beside Clone Button\n\n18. Copy Repository url from Clone dropdown\n\n19. Open IDE (e.g. VSCode)\n\n20. Open integrated terminal\n\n21. If (base) shows (due to Anaconda installed) type `deactivate`\n\n22. Click cog wheel in bottom left corner for settings\n\n23. Sync Visual Studio Code with GitHub\n\n24. (May need to Install some Recommended Extensions) (go to left vertical column and click on symbol of blocks about 5th from the top)\n\n25. In Integrated Terminal: type: `git clone` and then space and Paste url content Copied from GitHub Clone Button into integrated terminal in Visual Studio Code\n\n26. Press Enter (this will clone repo)\n\n27. Click File \u003e Add New File \u003e name it README.md (if not already in repository)\n\n28. In terminal: Type the following 3 git commands pressing enter after each\n\n29. `git add .`\n\n30. `git commit -m \"Add README md file\"`\n\n31. `git push`\n\n32. `git status`\n\n33. `git pull`\n\nOptional commands (for later reference) for cloning another repository into local and then pushing to own repository:\n\n34. To clone another repository: \n\n35. Clone the repo from [other repository to be cloned] to your local machine as follows:\n\n36. Click dropdown arrow beside green clone button on repository to be cloned, and copy \u003curl ending in .git\u003e\n\n37. Create a new repo at github.\n\n38. To **Setup own remote repository:** Go to GitHub.com \u003e Login \u003e Click New Repository \u003e (in this case: do not make any edits on opening screen (apart from name and setting public or private) to get to screen with \"If you've done this kind of thing before, then copy url .git)\n\n39. VSCode \u003e File \u003e New Window\n\n40. Set up local folder\n\n41. **In VSCode:** Go to left vertical column, click third image from top to go to git commands GUI (Graphic User Interface) (can either use this or the equivalent terminal commands [git clone \u003cpaste repo url with .git ending from Clone buitton drropdown menu on GitHub\u003e](https://git-scm.com/docs/git-clone) interchangeably)\n\n42. if using GUI Click Clone, paste url copied from GitHub Repository to be cloned into the window that appears, click Enter to clone into currently selected local folder.\n\n### Disconnect from cloned repo remote repository:\n\n43. `git remote rm origin` [StackOverflow | How to remove origin from git repository](https://stackoverflow.com/questions/9224754/how-to-remove-origin-from-git-repository)\n\n### Connect to own new repository remote repository on GitHub:\n\n44. `$ git remote set-url origin http://github.com/YOU/YOUR_REPO` [StackOverflow](https://stackoverflow.com/questions/18200248/cloning-a-repo-from-someone-elses-github-and-pushing-it-to-a-repo-on-my-github)\n\n45. `git remote -v` to check if there is one line ending in (fetch) and one ending in (push) (2 lines total). If there are 4 lines, then can remove the lines not beginning with origin.\n\n46. If get error this site contains instructions to fix and is also a reference for commands mentioned here. [How to fix ‘fatal: remote origin already exists’ Git error](https://komodor.com/learn/how-to-fix-fatal-remote-origin-already-exists-error/)\n\n### Miscellaneous commands possibly needed:\n\n47. Reference for following commands: [Git push existing repo to a new and different remote repo server?](https://stackoverflow.com/questions/5181845/git-push-existing-repo-to-a-new-and-different-remote-repo-server)\n\n48. `git remote rename origin upstream`\n\n49. `git remote add origin URL_TO_GITHUB_REPO`\n\n50. `git push origin master`\n\n### Further miscellaneous commands:\n\n51. `git checkout \u003ccommit\u003e` full command: with optional flags: [git checkout [-q] [-f] [-m] [--detach] \u003ccommit\u003e](https://git-scm.com/docs/git-checkout)\n\n52. Partial command: `git merge` Reference: [git merge | git-scm.com](https://git-scm.com/docs/git-merge)\n\nSide note:\n\nfrom git merge reference above:\n\nCan use the following commands with CAUTION if read up a bit on them first here and possibly elsewhere in certain situations:\n\n```bash\n--ff\n--no-ff\n--ff-only\n```\n\n```text\nSpecifies how a merge is handled when the merged-in history is already a descendant of the current history. --ff is the default unless merging an annotated (and possibly signed) tag that is not stored in its natural place in the refs/tags/ hierarchy, in which case --no-ff is assumed.\n\nWith --ff, when possible resolve the merge as a fast-forward (only update the branch pointer to match the merged branch; do not create a merge commit). When not possible (when the merged-in history is not a descendant of the current history), create a merge commit.\n\nWith --no-ff, create a merge commit in all cases, even when the merge could instead be resolved as a fast-forward.\n\nWith --ff-only, resolve the merge as a fast-forward when possible. When not possible, refuse to merge and exit with a non-zero status.\n```\n\n53. Partial command: `git branch` Reference: [git branch | git-scm.com](https://git-scm.com/docs/git-branch)\n\n54.  `git reset --soft HEAD` or `git reset --soft \u003ccommit to revert to\u003e` (Note: soft means not permanent, and can undo if wrong, however, next command uses hard, which cannot be undone, so proceed with Caution!)\n\n55. **WARNING!!**, be very careful with this one, as it **DELETES!!** things: `git reset --hard` to undo last commit, OR: **To go back multiple commits!**: `git reset --hard \u003ccommit-hash\u003e` [Be aware that the git reset –hard HEAD or git reset –hard HEAD@{n} command would remove your uncommitted changes, even if you staged them. If you don’t want your unstaged changes to be removed, you can use the --soft flag instead of the --hard flag. | Git Reset Hard – How to Reset to Head in Git | freeCodeCamp](https://www.freecodecamp.org/news/git-reset-hard-how-to-reset-to-head-in-git/)\n\n____\n\nUpdate 18-01-2024:\n\nThe following may be needed to make WSL, VSCode, git and GitHub work together effectively:\n\n[Install the GitHub Pull Requests and Issues extension](https://code.visualstudio.com/docs/sourcecontrol/github) in VSCode\n\nIn addition to point 4. above, \n\n(namely [PowerShell `wsl --install`](https://learn.microsoft.com/en-us/windows/wsl/install))\n\nAlso, if this error happens:\n\n[WSL broken with \"Class not registered\" code 4294967295 (0xffffffff) #8268](https://github.com/microsoft/WSL/issues/8268)\n\n```text\nTo fix \"Class not registered\" error, I only repair WSL on \"Settings \u003e Applications \u003e Instaled Applications \u003e Windows Subsystem for Linux \u003e Advanced Options \u003e Repair\". After do that, my WSL command returned to work.\n```\n\n```text\n\nTo fix \"Class not registered\" error, I only repair WSL on \"Settings \u003e Applications \u003e Instaled Applications \u003e Windows Subsystem for Linux \u003e Advanced Options \u003e Repair\". After do that, my WSL command returned to work.\n\nI ended up having to uninstall Windows Subsystem for Linux from here, disable the windows feature (start menu \u003e Turn windows features on or off), reboot, then re-enable it\n\n```\n\nSummary:\n\nIn addition to toggling on and off wsl in turn Windows Features on or off in Control Panel: \n\n- Windows PowerShell 2.0\n\n- open PowerShell (may need to run as Admin)\n\n- wsl --install\n\n- reboot\n\nOther references for this:\n\nSearch: [PS C:\\WINDOWS\\system32\u003e wsl --install Class not registered Error code: Wsl/CallMsi/REGDB_E_CLASSNOTREG](https://www.google.com/search?q=PS+C%3A%5CWINDOWS%5Csystem32%3E+wsl+--install+Class+not+registered+Error+code%3A+Wsl%2FCallMsi%2FREGDB_E_CLASSNOTREG\u0026oq=PS+C%3A%5CWINDOWS%5Csystem32%3E+wsl+--install+Class+not+registered+Error+code%3A+Wsl%2FCallMsi%2FREGDB_E_CLASSNOTREG\u0026gs_lcrp=EgZjaHJvbWUyBggAEEUYOdIBBzQzMWowajeoAgCwAgA\u0026sourceid=chrome\u0026ie=UTF-8)\n\n[WSL broken with \"Class not registered\" code 4294967295 (0xffffffff) #8268](https://github.com/microsoft/WSL/issues/8268)\n\n[How to deal with the problem: “Error code: Wsl/CallMsi/REGDB_E_CLASSNOTREG”](https://learn.microsoft.com/en-us/answers/questions/1462932/how-to-deal-with-the-problem-error-code-wsl-callms)\n\n[Error code: Wsl/CallMsi/REGDB_E_CLASSNOTREG #10882](https://github.com/microsoft/WSL/issues/10882)\n\n[How can I fix WSL.exe sudden corruption in unknown DLL giving error 0x80040154 on Win11](https://superuser.com/questions/1776891/how-can-i-fix-wsl-exe-sudden-corruption-in-unknown-dll-giving-error-0x80040154-o)\n\n____\n\nUpdate 23-03-2024:\n\n```bash\ngit remote set-url origin \u003cgit url here\u003e\n```\n\ngives:\n\n```bash\nerror: No such remote 'origin'\n```\n\nReason:\n\nhere:\n\n[](https://stackoverflow.com/questions/25503017/why-does-git-tell-me-no-such-remote-origin-when-i-try-to-push-to-origin)\n\nbasically:\n\n1 - You never told Git to start tracking any file\n\nFor that you need to stage the files of interest, using:\n\n```bash\ngit add .\n```\n\n```bash\ngit commit -m \"some descriptive message\"\n```\n\n2 - You haven't set up the remote repository\n\nSummary of Solution:\n\n```bash\ngit remote add origin \u003cGitHub Repository url goes here\u003e\n```\n\nSource: StackOverflow:\n\n[Why does Git tell me \"No such remote 'origin'\" when I try to push to origin? | StackOverflow](https://stackoverflow.com/questions/25503017/why-does-git-tell-me-no-such-remote-origin-when-i-try-to-push-to-origin)\n\n____\n\nafter above fix\n\ncan check it worked with:\n\n```bash\ngit remote -v\n```\n\nThis should show that the \n\n```bash\n\u003cGitHub Repository url\u003e\n```\n\npasted in the above is listed as\n\n```bash\n(origin)\n```\n\nfor both:\n\n```bash\n(fetch)\n```\n\nand\n\n```bash\n(push)\n```\n\n____\n\nUpdate 20-07-2024:\n\nSearch and Reference on LF replacement by CRLF in git\n\n[Git failed error warning: in the working copy of LF will be replaced by CRLF the next time Git touches it LF will be replaced by CRLF the next time LF will be replaced by CRLF the next time Git touches it warning: in the working copy of  LF will be replaced by CRLF the next time Git touches it warning: in the working copy of LF will be replaced by CRLF the next time Git touches it warning: in the working copy of LF will be replaced by CRLF the next time Git touches it warning: in the working copy of LF will be replaced by CRLF the next time Git touches it warning: in the working copy of](https://www.google.com/search?q=Git+failed+error+warning%3A+in+the+working+copy+of+LF+will+be+replaced+by+CRLF+the+next+time+Git+touches+it+LF+will+be+replaced+by+CRLF+the+next+time+LF+will+be+replaced+by+CRLF+the+next+time+Git+touches+it+warning%3A+in+the+working+copy+of+LF+will+be+replaced+by+CRLF+the+next+time+Git+touches+it+warning%3A+in+the+working+copy+of+LF+will+be+replaced+by+CRLF+the+next+time+Git+touches+it+warning%3A+in+the+working+copy+of+LF+will+be+replaced+by+CRLF+the+next+time+Git+touches+it+warning%3A+in+the+working+copy+of+LF+will+be+replaced+by+CRLF+the+next+time+Git+touches+it+warning%3A+in+the+working+copy+of\u0026oq=Git+failed+error+warning%3A+in+the+working+copy+of+LF+will+be+replaced+by+CRLF+the+next+time+Git+touches+it+LF+will+be+replaced+by+CRLF+the+next+time+LF+will+be+replaced+by+CRLF+the+next+time+Git+touches+it+warning%3A+in+the+working+copy+of++LF+will+be+replaced+by+CRLF+the+next+time+Git+touches+it+warning%3A+in+the+working+copy+of+LF+will+be+replaced+by+CRLF+the+next+time+Git+touches+it+warning%3A+in+the+working+copy+of+LF+will+be+replaced+by+CRLF+the+next+time+Git+touches+it+warning%3A+in+the+working+copy+of+LF+will+be+replaced+by+CRLF+the+next+time+Git+touches+it+warning%3A+in+the+working+copy+of\u0026gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIGCAEQRRhA0gEHMzcwajBqN6gCALACAA\u0026sourceid=chrome\u0026ie=UTF-8)\n\n[How can I stop this error. LF will be replaced by CRLF the next time Git touches it](https://github.com/orgs/community/discussions/66838)\n\n____\n\n## References\n\n[freeCodeCamp](https://www.freecodecamp.org/)\n\n[git-scm.com](https://git-scm.com/)\n\n- [2.6 Git Basics - Tagging](https://git-scm.com/book/en/v2/Git-Basics-Tagging)\n\n[stackoverflow](https://stackoverflow.com/)\n\n[learn.microsoft.com](https://learn.microsoft.com/en-us/)\n\n[Visual Studio Code](https://code.visualstudio.com/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodersales%2Fhow-to-github-basically","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodersales%2Fhow-to-github-basically","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodersales%2Fhow-to-github-basically/lists"}