Skip to content Skip to sidebar Skip to footer

How to Upload to Github Repository and Keep File Hierarchy

A lot of students ask questions most open up source. What is open source, how can I contribute to it? Is information technology helpful if I contribute to open source, and the list goes on relevant to "Open Source".

So what is open up source???

According to opensource.com, The term "open up-source" refers to something people can modify and share because its design is publicly attainable.

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

There are and then many blogs available on the cyberspace to learn about open source, software, and their importance. The about 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 project, or a set up of files, as they modify over time. Git stores this information in a information 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, but it adds many of its own features. While Git is a control-line tool, GitHub provides a Web-based graphical interface. Information technology also provides access control and several collaboration features, such every bit wikis and basic task direction tools for every project.

Let's talk over some control used in git to push button, pull, commit and do changes to your GitHub repository.

  • Starting time, install Git from the official site https://git-scm.com/downloads and install it in your PC then after creating your contour 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 use this command to clone this repository to your PC.
    git clone [your copy link]

    git-clone

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

    git-status

  • Now to add together these files into staging surface area (Staging is a step earlier the commit process in git. That is, a commit in git is performed in 2 steps: staging and actually commit. As long equally a changeset is in the staging area, git allows yous to edit information technology every bit you like to supervene upon staged files with other versions of staged files, remove changes from staging, etc.) utilise command
    git add <files_Name with their corresponding extensions>

    git-add

  • Here you tin can come across that now your files are successfully added to the staging area. At present you lot need to commit these files with a description. And to do then utilise
    git commit -one thousand "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

  • Swell, At present just 1 step left this is to button these changes in our Github repository. Utilise the control beneath to upload your files or any changes.
    git push origin chief

    git-push

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

github

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

kidneywaintly.blogspot.com

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

Publicar un comentario for "How to Upload to Github Repository and Keep File Hierarchy"