GitHub Repository Setup, Clone and Push using Git

Taimoor Sattar
Github is the server way (web hosting service) for version control system using Git, tracks your files and coordinating work on those files among different people. In order to best understand GitHub, I recommend you to look at the local way of version control system, Git. Here are some of the terms that we will be looking at this blog:
  • Repository Setup
  • Setup remote URL
  • Clone Repo
  • Push Repo
Repo and Repository are both same thing.

Repository Setup

It is similar to folder present at you local computer. Github called it repository. In order to create a repository, click add new button after signing into the GitHub account. It will ask you the name of the repository. For example, In the computer, folder location is C:\Users\github\Desktop\github-main and In Github, repository location is:

Setup remote URL

In Github, You can create multiple repositories folders. And you can also look at the people public repository. You can clone and push from your repository but you can only clone from other people repository. You are working on the local computer, in order to communicate to the repository on GitHub you want to set URL. For this enter, this command.
git remote set-url origin
In order to check your remote URL set, Enter this command: 
git remote -v

Clone repo

It stands for moving GitHub repository from the local computer. It means copy one folder into another folder. In order to set which repository URL you want to clone you have to set URL by this command: 
git remote set-url origin
Enter the GitHub repository URL to clone to the local hard drive
git clone

Push Repo

Push is opposite to clone. Push stand for moving your local project folder to the GitHub repository. In order to achieve, set the repository URL
git clone

As you are familiar with these basic terms. Now, we shall move toward the real project. Create a folder github-main in the local computer and inside this folder create index.html and style.css and place dummy HTML and CSS in the file, git add -A all the files and commit the changes; as explained in this section of the blog. Now, you are set up locally and ready to move to the repository. git command Before going on, Sign up or log in to GitHub account. While signing up, they may ask you about the plan; Just choose a free plan which means public repository. The private repository is only needed when you have an important file that you don't want to share in public. Github Signup Go to the GitHub and create a new repository by clicking add repository or look at the + symbol on top, then choose a repository name. Now, on terminal window enter this command at explaining in the picture: GitHub Push
git remote add origin
git push -u origin master
Refresh your repository, Now you will see that your files move to the repository.

Setup project for Clone

Now it is time to move your files from your repo to local computer folder. Make a folder 'my-folder' where to want to move your files. Note that you want to type cd(change directory) to your 'my-folder' where you want to move repository files. Then type this command. Git Clone
git clone
Now, you have move files from this repo to your local folder.