Try using Git Bash to push your code/make changes instead of uploading files directly on GitHub (it is less prone to errors and is quite comfortable at times - takes less time as well!), for doing so, you may follow the below-given steps:
- Download and install the latest version of Git Bash from here - https://git-scm.com/
- Right-click on any desired location on your system.
- Click “Git Bash Here”.
- git config --global user.name “your name”
- git config --global user.email “your email”
- Go back to your GitHub account – open your project – click on “clone” – copy HTTPS link.
- git clone PASTE HTTPS LINK.
- Clone of your GitHub project will be created on your computer location.
- Open the folder and paste your content.
- Make sure content is not empty
- Right-click inside the cloned folder where you have pasted your content.
- Click “Git Bash Here” again.
- You will find (master) appearing after your location address.
- git add .
- Try git status to check if all your changes are marked in green.
- git commit --m “Some message”
- git push origin master