How to upload a project to Github
How to upload a project to Github
Steps
1 – First you need to install Git and install it on your PC then you need to create your profile on Github https://github.com, make a repository and clone.
2 – Open Git and use the following command to clone the repository to your PC.
git clone https://github.com/username/reponame.git
3 – You need to add some code in the clone directory and run the following command
git status
git add file_name.ext
or
git add . // that will add all files
The git status command displays the state of the working directory and the staging area. It lets you see which changes have been staged.
The git add command adds a file to the Git staging area. This area contains a list of all the files you have recently changed.
4 – now you commit your changes using the following command
git commit -m "Your commit message"
git commit creates a commit, which is like a snapshot of your repository. These commits are snapshots of your entire repository at the time of the commit. You should make new commits often, based on changes of code.
To create a Git commit with a message is to execute “git commit” with the “-m” option followed by your commit message.
Now you have committed changes in our local PC and to upload these changes to our remote profile using the following command
git push origin master
You have successfully uploaded your files to your GitHub repository.