Skip to content Skip to sidebar Skip to footer

How to Upload My Code on Github

A lot of students ask questions well-nigh open up source. What is open source, how tin I contribute to it? Is it helpful if I contribute to open source, and the list goes on relevant to "Open Source".

So what is open source???

According to opensource.com, The term "open up-source" refers to something people can modify and share considering its pattern is publicly accessible.

The term originated in the context of software evolution to designate a specific approach to creating computer programs. Today, all the same, "open up-source" designates a broader fix of values — what we call "the open up source manner." Open source projects, products, or initiatives embrace and celebrate principles of open up exchange, collaborative participation, rapid prototyping, transparency, meritocracy, and customs-oriented evolution. i.e., "open-source is what is free to access past all. Anyone can change and distribute its own model".

There are and so many blogs available on the internet to learn virtually open source, software, and their importance. The most common and widely used platform to use for open source is Git and GitHub.

add-projects-on-github

The purpose of Git is to manage a projection, or a set of files, as they modify over fourth dimension. Git stores this information in a data structure called a repository. A git repository contains, among other things, the following: A set of commit objects.

GitHub is a Git repository hosting service, only it adds many of its ain features. While Git is a command-line tool, GitHub provides a Web-based graphical interface. It too provides admission control and several collaboration features, such as wikis and basic task direction tools for every project.

Let'south discuss some command used in git to push, pull, commit and exercise changes to your GitHub repository.

  • First, install Git from the official site https://git-scm.com/downloads and install information technology in your PC then after creating your profile on Github https://github.com, brand a repository and clone (copy the link of your repository) your repository with HTTPS.
  • Now get to Git Bash software and utilise this control to clone this repository to your PC.
    git clone [your re-create link]

    git-clone

  • Git Bash don't use ctrl+V to paste any segment so paste your link past using shift+Ins key
  • At present yous have cloned your Github repository to your system now add all yous relevant codes in that cloned directory to upload information technology to your GitHub Profile.
  • Now when you lot will type control git condition you volition see all those files yous take added to the directory in ruby-colored untracked file segment like this. Here laddu.txt is the unracked file that I have just moved to the directory.

    git-status

  • Now to add together these files into staging expanse (Staging is a step before the commit process in git. That is, a commit in git is performed in two steps: staging and really commit. Equally long as a changeset is in the staging surface area, git allows you lot to edit it every bit yous like to supervene upon staged files with other versions of staged files, remove changes from staging, etc.) use command
    git add <files_Name with their respective extensions>

    git-add

  • Here you lot tin can encounter that now your files are successfully added to the staging area. Now you lot need to commit these files with a description. And to do so use
    git commit -m "Your description"

    git-commit

  • Now we have committed these changes in our local system and to upload these changes to our remote profile use command
    git remote -five

    git-remote

  • Great, At present just one step left this is to push button these changes in our Github repository. Use the command below to upload your files or whatever changes.
    git push origin master

    git-push

Great You have successfully uploaded your files to your GitHub repository.

github

All the files and directories are uploaded to your Github account. Now you can manage, revert, access or exercise any changes in your repositories like this.

ladnerablemody.blogspot.com

Source: https://www.geeksforgeeks.org/how-to-upload-a-project-on-github/

Post a Comment for "How to Upload My Code on Github"