Hi friends, in this tutorial, you will learn how to upload project on GitHub repository which contains all the project files including the project description, if you are wondering to do so then you have come to the right place.
Sometimes web developers are very concerned about their application software or any other project they do and one of the main factors is to preserve the codes or projects in a safe place so that they can share those projects or codes globally or they can use them in the future whenever they need.
Also, Github is the most widely used platform for open-source projects. So, I will explain the process of uploading a project on GitHub in a step-by-step process in a beginner-friendly manner.
Steps to upload project on GitHub
Step 1:- Go to GitHub and make an account.
Step 2:- After logging in to GitHub, click on the plus(+) sign at the right side of the menu bar and click on create a new repository.
Step 3:- Now, just fill in the details with the repository name and click on create repository as shown below.
Step 4:- After creation, you will see the repository page as shown below.
Step 5:- Now, download Git from here. If you do not download this then you can not upload the project using the Git command line.
Step 6:- Now create a folder with the exact name of your git repository in your local drive such as D, E, etc.
Step 7:- Now, right-click on the folder and open with Git Bash as shown in the below image.
Step 8:- Now, run the below commands one by one in the git command terminal as given below.
echo "# ecom" >> README.md
git add README.md
git commit -m "first commit"
git branch -M master
git remote add origin https://github.com/your GitHub username/Payment-Gateway.git
git push -u origin master
Git Bash Output with the above commands:-
Step 9:- Now, run the below command to check whether any file or project exists in the folder you created in your local drive.
$ git status
After executing the above command in Git Bash, it will return untracked files as shown below
Step 10:- Now, copy your project folder and paste it into the repository folder you created in your local drive.
Step 11:- Open the git terminal and run the below two commands as given below.
$ git add "project folder/"
$ git status
Now, you will see the changes to be committed in the Gitbash output with the above commands as shown in the below image.
Step 12:- Now, run the below command to add the project description in your git repository.
$ git commit -m "Description of the project"
Step 13:- Now run the below two final commands in the git bash terminal to push the project on GitHub.
$ git pull
$ git push
Gitbash output with the above commands:-
Conclusion:- I hope this tutorial will help you to understand the overview. If there is any doubt then please leave a comment below.
Also read, PHP Rest API Example