2026 A to Z command line guide in compliance with DevOps standards. Manage version control systems professionally.
In this article, we explain in detail the process of uploading (push) a folder or files on your computer to GitHub using Git via Windows CMD (Command Prompt). Whether you're starting a project from scratch or moving an existing project to GitHub, this guide has been prepared according to 2026 software standards.
Not: This tutorial focuses on Windows CMD; however, the commands are %99 the same in Git Bash, PowerShell and Linux/MacOS terminals. For Git management on the server side Eka Sunucu VPS You can review our services.
Before importing your projects into the version control system, you need to meet the basic requirements. In 2026 ,%95% of software development processes are Git-based.
Open CMD and run the following command. If you see the version number, the installation is complete.
If it is not installed git-scm.com You can download and install it from .
Git wants to know who made the commits. You only need to make this setting once.
You have a new project on your computer and you are going to upload it to GitHub for the first time. Let's proceed step by step.
This command is in your folder .git Creates a hidden administrative folder named .
'master' used to be used, but the modern standard is 'main'.
We add all the files and save our first version.
After creating an empty repo on GitHub (Repo Create), connect your local project to the remote server using the HTTPS or SSH link provided to you.
Publish your PHP, Node.js or Python projects that you uploaded to GitHub on Eka Sunucu's high-performance cloud infrastructure. Maximum speed with NVMe SSD disks and 10 Gbit line.
Check out Web Hosting PackagesIf you want to send your own local files to a repo that already has files on GitHub (for example, there is README.md in it), the method changes.
First, download the repo to your computer, add your files into it and send it. This prevents conflicts.
Now copy your project files to this folder and continue with the standard process:
GitHub no longer allows password pushes (since 2021). There are two main methods:
Create a token from GitHub Settings > Developer Settings > Personal Access Tokens. Paste this token when asked for password when pushing.
SSH provides a secure connection without entering a password. As Eka Sunucu Linux VPS We recommend using SSH in management.
Add the resulting code to GitHub > Settings > SSH and GPG Keys. Then switch your repo connection to SSH:
| Komut | Description |
|---|---|
git status |
Shows which files have changed. |
git diff |
It shows line by line detail of the changes made. |
git pull |
Pulls changes from the remote server (GitHub) to the local. |
git log --oneline |
Lists past commits in summary form. |
git branch |
Lists existing branches. |
git checkout -b yeni-ozellik |
It creates a new branch and moves to that branch. |
fatal: not a git repositoryReason: You are in a folder that has not been git inited.
Solution: Enter the project folder or git init do it.
failed to push some refsReason: There are files on GitHub that you do not have (someone else may have committed them).
Solution: Before git pull --rebase do it, then push.
LF will be replaced by CRLFReason: Windows and Linux line ending difference.
Solution: It's usually not a problem, Git handles this automatically. To set: git config --global core.autocrlf true
If you want to keep your data on your own server instead of GitHub, you can download Eka Sunucu VDS packages. GitLab or Gitea You can create your own private Git server by installing
Check out VDS Packages