What Is the of Uploading Code to a Repository
Hi all, today nosotros will be learning how to host Source Code of Open Source Software in the repository hosted by github.com. GitHub is a web-based Git repository hosting service, which offers all of the distributed revision control and source code management (SCM) functionality of Git every bit well as adding its own features. It provides a workplace to host powerful collaboration, code review, and lawmaking direction for open source and private projects. Unlike Git, which is strictly a control-line tool, GitHub provides a web-based graphical interface and desktop too every bit mobile integration. GitHub offers both paid plans for private repositories and gratuitous accounts, which are usually used to host open-source software projects.
It is fast and more flexible web based hosting service which is piece of cake to use and to manage distributed revision command. Anyone can host their software's source code in github's repository for the utilise, contribution, sharing, effect tracking and many more than by millions of people across the earth. Here are some easy and quick steps to easily host software's source code.
1. Creating a new Github Account
First of all, open your favorite browser and go to Github's homepage url ie github. Then, the homepage volition be opened every bit shown below.
At present, subsequently the homepage has been opened, please fill form shown to sign upwards for a new github account.
Later the you entered the valid information required for sign up, you lot'll be redirected to the program choosing step. We have 5 plans listed in this page. I can choose the plan according to their requirement. Here, we'll get for a free plan. So, click on Choose to the Complimentary plan and click on Finish Sign up. If we are planning to create an organization then, we need to tick on Help me setup an organization next.
ii. Creating a New Repository
After we have successfully signed up a new business relationship or logged in to Github, we'll now need to create a new Repository to get started.
Click on (+) button which is located at the pinnacle right near the account id. And so Click on New Repository .
Now, after clicking on add a new repository, we'll now be directed to the page where we'll need to enter the required information.
At present, afterward entering the required information about the new repository, nosotros'll need to click on green Create repository button.
After it is washed, we'll get to see something similar similar this image.
3. Uploading an existing Project
If we want to share our existing project on Github, we'll surely need to button the codes to the repository we created. To exercise so, we'll outset need to install git in our Linux machine. Every bit I am running Ubuntu 14.04 LTS in my motorcar, I'll need to run apt managing director to install it.
$ sudo apt-become install git
Now, as git is ready, we are now set up to upload the codes.
Annotation: To avoid errors, do not initialize the new repository with README, license, or gitignore
files. You tin add these files subsequently your projection has been pushed to GitHub.
In Terminal, nosotros'll need to change the current working directory to your local project then initialize the local directory equally a Git repository/
nbsp;git init
We'll then add together the files in our new local repository. This stages them for the get-go commit.
$ git add .
At present, we'll need to commit the files that we've staged in our local repository.
$ git commit -yard 'First commit'
In Terminal, we'll add the URL for the remote repository where our local repostory will be pushed.
$ git remote add origin remote Repository url $ git remote -v
Notation: Delight do replace remote Repository url to the url of the remote repo.
At present, to push button the changes in our local repository to GitHub's repo we'll demand to run equally below and enter the required credential for the repository.
$ git button origin principal
Cloning a Repo
If nosotros want to download a code repository from github straight to our local drives with a single command then, we tin simply use git clone command which will clone the current directory to the remote repository.
$ git clone https://github.com/aruntechgeek/linspeed.git
Please change the to a higher place url to the repository you want to clone from.
Updating a Change
If we made changes to our lawmaking and desire to push them to our remote repository so later on irresolute the changes, nosotros should run the following commands inside that directory.
$ git add . $ git commit -thousand "Updating" $ git button
Conclusion
Hurray! We have successfully hosted our Project Source Lawmaking in Github repository. Github is fast and more than flexible web-based hosting service that is easy to utilise and to manage distributed revision control. Millions of crawly Open Source projects are hosted in Github. So, if you take any questions, suggestions, feedback please write them in the annotate box below. Thank y'all! Enjoy Github :-)
Source: https://linoxide.com/host-open-source-code-repository-github/
0 Response to "What Is the of Uploading Code to a Repository"
Post a Comment