{"id":51503561,"url":"https://github.com/cameroncodesstuff/tempname","last_synced_at":"2026-07-07T22:01:12.831Z","repository":{"id":368085262,"uuid":"1283464924","full_name":"CameronCodesStuff/tempname","owner":"CameronCodesStuff","description":"Git Push from CMD (Windows) — Upload Only a Selected Folder","archived":false,"fork":false,"pushed_at":"2026-06-29T00:39:35.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-29T02:18:08.438Z","etag":null,"topics":["cmd","folder","git","push"],"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/CameronCodesStuff.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-29T00:36:01.000Z","updated_at":"2026-06-29T00:40:48.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/CameronCodesStuff/tempname","commit_stats":null,"previous_names":["cameroncodesstuff/tempname"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/CameronCodesStuff/tempname","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CameronCodesStuff%2Ftempname","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CameronCodesStuff%2Ftempname/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CameronCodesStuff%2Ftempname/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CameronCodesStuff%2Ftempname/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CameronCodesStuff","download_url":"https://codeload.github.com/CameronCodesStuff/tempname/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CameronCodesStuff%2Ftempname/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35243953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-07T02:00:07.222Z","response_time":90,"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":["cmd","folder","git","push"],"created_at":"2026-07-07T22:01:12.058Z","updated_at":"2026-07-07T22:01:12.802Z","avatar_url":"https://github.com/CameronCodesStuff.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Git Push from CMD (Windows) — Upload Only a Selected Folder\n\nThis guide shows how to upload a **specific folder** to a GitHub repository using **Command Prompt (CMD)**.\n\n\u003e **Note:** Git tracks files inside a repository. If you only want one folder, either:\n\u003e - Create a new repository containing only that folder (recommended), or\n\u003e - Use Git from the folder you want to upload.\n\n---\n\n# Step 1: Open Command Prompt\n\nPress:\n\n```text\nWin + R\n```\n\nType:\n\n```text\ncmd\n```\n\nPress **Enter**.\n\n---\n\n# Step 2: Navigate to Your Folder\n\nUse the `cd` command.\n\nExample:\n\n```cmd\ncd C:\\Users\\YourName\\Documents\\MyProject\n```\n\nExample with spaces:\n\n```cmd\ncd \"C:\\Users\\YourName\\Desktop\\My Folder\"\n```\n\nVerify you're in the correct location:\n\n```cmd\ndir\n```\n\n---\n\n# Step 3: Initialize Git\n\nIf the folder is **not already a Git repository**:\n\n```cmd\ngit init\n```\n\n---\n\n# Step 4: Connect to GitHub\n\nAdd your GitHub repository as the remote.\n\nHTTPS:\n\n```cmd\ngit remote add origin https://github.com/USERNAME/REPOSITORY.git\n```\n\nSSH:\n\n```cmd\ngit remote add origin git@github.com:USERNAME/REPOSITORY.git\n```\n\nCheck it:\n\n```cmd\ngit remote -v\n```\n\n---\n\n# Step 5: Stage Only the Files You Want\n\n## Option A — Stage Everything in This Folder\n\n```cmd\ngit add .\n```\n\n---\n\n## Option B — Stage One Specific Folder\n\nExample:\n\n```cmd\ngit add Assets/\n```\n\nor\n\n```cmd\ngit add src/\n```\n\nYou can stage multiple folders:\n\n```cmd\ngit add Assets src Docs\n```\n\n---\n\n## Option C — Stage Individual Files\n\n```cmd\ngit add README.md\ngit add main.py\n```\n\n---\n\n# Step 6: Commit\n\n```cmd\ngit commit -m \"Initial upload\"\n```\n\nExample:\n\n```cmd\ngit commit -m \"Added Assets folder\"\n```\n\n---\n\n# Step 7: Set the Branch\n\nFor modern Git:\n\n```cmd\ngit branch -M main\n```\n\n---\n\n# Step 8: Push to GitHub\n\nFirst push:\n\n```cmd\ngit push -u origin main\n```\n\nFuture pushes:\n\n```cmd\ngit push\n```\n\n---\n\n# Uploading Only One Folder from a Larger Project\n\nSuppose your project looks like this:\n\n```text\nProject/\n│\n├── Assets/\n├── Scripts/\n├── Docs/\n└── README.md\n```\n\nTo upload **only `Assets`**:\n\n```cmd\ngit add Assets/\ngit commit -m \"Upload Assets folder\"\ngit push\n```\n\nOnly the staged changes in `Assets` will be included in that commit.\n\n---\n\n# Check What Will Be Committed\n\nSee staged files:\n\n```cmd\ngit status\n```\n\nExample output:\n\n```text\nChanges to be committed:\n\n    new file: Assets/logo.png\n    new file: Assets/config.json\n```\n\n---\n\n# Useful Commands\n\n## View Status\n\n```cmd\ngit status\n```\n\n---\n\n## View Commit History\n\n```cmd\ngit log --oneline\n```\n\n---\n\n## See Remote Repository\n\n```cmd\ngit remote -v\n```\n\n---\n\n## Remove a File from the Staging Area\n\n```cmd\ngit restore --staged filename\n```\n\nExample:\n\n```cmd\ngit restore --staged Assets/logo.png\n```\n\n---\n\n## Stage Everything Again\n\n```cmd\ngit add .\n```\n\n---\n\n## Push New Changes\n\n```cmd\ngit add .\ngit commit -m \"Updated files\"\ngit push\n```\n\n---\n\n# Complete Example\n\n```cmd\ncd \"C:\\Projects\\MyFolder\"\n\ngit init\n\ngit remote add origin https://github.com/USERNAME/REPOSITORY.git\n\ngit add Assets/\n\ngit commit -m \"Upload Assets folder\"\n\ngit branch -M main\n\ngit push -u origin main\n```\n\n---\n\n# Common Errors\n\n## `fatal: not a git repository`\n\nRun:\n\n```cmd\ngit init\n```\n\nor navigate to the correct folder.\n\n---\n\n## `remote origin already exists`\n\nRemove it:\n\n```cmd\ngit remote remove origin\n```\n\nThen add it again:\n\n```cmd\ngit remote add origin https://github.com/USERNAME/REPOSITORY.git\n```\n\n---\n\n## `nothing to commit`\n\nCheck:\n\n```cmd\ngit status\n```\n\nIf nothing is staged, add files:\n\n```cmd\ngit add Assets/\n```\n\nor\n\n```cmd\ngit add .\n```\n\n---\n\n## Authentication Failed\n\nIf using HTTPS:\n\n- Make sure you're signed into GitHub.\n- Use a Personal Access Token (PAT) instead of your password if prompted.\n\nIf using SSH:\n\n```cmd\nssh -T git@github.com\n```\n\n---\n\n# Quick Reference\n\n```cmd\ncd \"C:\\Path\\To\\Folder\"\n\ngit init\n\ngit remote add origin https://github.com/USERNAME/REPOSITORY.git\n\ngit add Assets/\n\ngit commit -m \"Upload Assets\"\n\ngit branch -M main\n\ngit push -u origin main\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcameroncodesstuff%2Ftempname","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcameroncodesstuff%2Ftempname","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcameroncodesstuff%2Ftempname/lists"}