...

Open source softwares - GIT

Back to Course

Lesson Description


Lession - #1150 GITHub Introduction


GitHub may be a web-based interface that uses git, the open supply version control software that lets multiple people build separate changes to web pages at a similar time. As Carpenter notes, as a result of it permits for real-time collaboration, GitHub encourages groups to work along to build and edit their website content.

Create a Repository on GitHub

Now that you just have created a GitHub account, sign in, and create a new Repo:

GitHub New Repo

And fill in the relevant details:

GitHub create New Repo

We will go over the different options and what they mean later. except for now, opt for Public (if you want the repo to be viewable for anyone>
or personal (if you want to choose who should be able to read the repo>
. Either way, you'll be able to opt for who will contribute to the repo.

Then click "Create repository".

Push native Repository to GitHub
Since we've got already set up a neighborhood git repo, we are going to push that to GitHub:

GitHub Push local


Copy the url, or click the clipboard marked in the image above.

Now paste it the following command:

Example

git remote add origin https://github.com/w3schools-test/hello-world.git
git remote add origin url specifies that you are adding a remote repository, with the specified url, as an origin to your local git repo.


Now we are going to push our master branch to the origin url, and set it as the default remote branch:

Example

git push --set-upstream origin master
Enumerating objects: 22, done.
Counting objects: 100 pc (22/22>
, done. Delta compression consumption to 16 threads Compressing objects: 100 percent (22/22>
, done. Writing objects: 100 percent (22/22>
, 92.96 KiB | twenty three.24 MiB/s, done. Total 22 (delta 11>
, reused zero (delta 0>
, pack-reused zero remote: resolving deltas: 100 percent (11/11>
, done. To https://github.com/w3schools-test/hello-world.git * [new branch] master -> master Branch 'master' set up to track remote branch 'master' from 'origin'


. Note: Since this is often the first time you're connecting to GitHub, you'll get some quite notification you to authenticate this connection.

Now, return into GitHub and see that the repository has been updated: