Uploading to the Github Repository Git Command
Github is Crawly. It allows you to do a lot of cool things, one of which is storing your files. Information technology's different from any other online data storage considering yous don't have to re upload the entire file every fourth dimension yous make some changes. You can work offline and then all of yous take to do is commit the changes and push information technology to the origin.
Github allows many people to contribute to a unmarried project as well (Check this out to learn about CONTRIBUTION on GitHub).
The very first time I tried to upload something on GitHub I plant it very disruptive. I went through a lot of blogs and videos just couldn't notice whatever easy style to upload the files. Fifty-fifty though I am comfortable with using terminal commands, I didn't want to blindly use the git commands without understanding anything.
And and then I found GitHub Desktop!
It can be a very good culling for someone who is merely getting started. It doesn't just make things easy. It also kind of lets you visualise and empathise the git terminology.
Follow these easy steps to successfully upload your showtime file :
Since you are planning to use GitHub, I call up I tin can assume that you know how to create an account and how to install a software and so I won't go into the details of the kickoff two steps.
You probably accept an account already, you just need to download and install GitHub Desktop.
Pace 1 : Create a GitHub account
Step 2 : Download and Install GitHub Desktop
Step iii: Setup your GitHub Desktop
If you are using Windows, information technology volition automatically ask you to sign in and configure your git. If you are using a Mac, you will have to go to Preferences and do all of that yourself.

Sign In to your Account

Configure Git

Go to Preference
Step 4: Sign In to your GitHub account
If you click the tiptop correct icon on your "dashboard" it will give yous a drop down carte, where you tin select "Your Profile" to go to your profile.

This is your dashboard

This is your profile
Stride 5: Create a Repository
Yous tin remember of "Repository"(repo in short) as a folder. You create one and keep files in them. To store your files on GitHub you need to create a repo first.
- Go to the "Repositories" tab on your profile
- Click "New"
- Name the repo
- Click "Create Repository"
(I named my repository "Hello_World".)
After you click "Create Repository" you will be redirected to a folio. The url of that page in the url of your repo. You will need that for the residuum of the steps.

Go to the "Repositories" tab on your pro le

Click "New"

Name the repo and Click "Create Repository"

Yous will demand the url of your repo.
If you lot go back to your profile, you will run into that a new repository has been created.
You will be redirected to the repository folio if you click on the repo.
You can get the url there every bit well.
Step 6: Clone your Repository
Now it's fourth dimension to start adding files to the new repo. You can piece of work directly on GitHub, but it'south non very convenient. We like to work offline on our calculator and then upload the edited piece of work, don't we? GitHub allows you to do exactly that.
We start by cloning the repository which is kind of like downloading the binder to your figurer. Simply it is more flexible, you don't accept to upload the whole folder again. Y'all tin can work offline and just button the changes to GitHub.
Go to GitHub Desktop and observe the "Clone Repository" option.
Type the url and choose the local directory.
(I named the folder "Hello_World" as well.)
Get select your folder on GitHub desktop. Your folder will exist empty because you haven't added annihilation yet.
If you lot had any files in your repo, your folder would have contained all the files now.

Binder on GitHub Desktop

Folder on your computer
Stride vii: Edit
Any changes you make to the folder volition exist automatically shown on your GitHub Desktop. Make sure yous have selected the current folder on your GitHub Desktop too.
For example, I'll create three new files in the "Hello_World" folder(left image) and they automatically appear on GitHub Desktop(right image)

Folder on your figurer

Binder on GitHub Desktop
Step 8: Commit
When you edit a file you always salve it before endmost, don't y'all? Retrieve of "Commit" as saving changes. You need to commit before you can upload information technology to GitHub.
Just like when you save a file you lot need to proper name information technology earlier you lot tin can click the salvage button, on GitHub Desktop, you lot demand to name the commit before you tin click the "Commit to master"
Equally shortly as you start typing a name, the button will automatically become clickable.
(Information technology is a proficient do to name the commit in a meaningful way.)
Step nine: Push
Now that you accept saved(committed) the changes , all you need to do is upload it. "Push" is uploading all the changes to Github.
Become ahead and click "Push button Origin".
You will now be able to see the uploaded files on your GitHub repository.

Push Origin

Files have been uploaded
Woo-hoo! Congratulations!
You have successfully uploaded your first file!
So now that you lot know what all the terms mean and yous are confident plenty to use GitHub, you tin switch to the command line considering at that place are a lot of other things you tin do with GitHub and some of them cannot be done using GitHub Desktop. Y'all will need the command line.
You volition find all the necessary git commands here.
Source: https://sheikhadilina.wordpress.com/2018/03/05/upload-files-to-github-without-using-the-command-line/
0 Response to "Uploading to the Github Repository Git Command"
Post a Comment