How to Upload a Java File to Github
A lot of students enquire questions about open source. What is open source, how can I contribute to it? Is it helpful if I contribute to open up source, and the list goes on relevant to "Open up Source".
So what is open up source???
According to opensource.com, The term "open-source" refers to something people can modify and share because its design is publicly accessible.
The term originated in the context of software development to designate a specific approach to creating figurer programs. Today, still, "open-source" designates a broader fix of values — what we telephone call "the open source style." Open source projects, products, or initiatives embrace and celebrate principles of open exchange, collaborative participation, rapid prototyping, transparency, meritocracy, and customs-oriented development. i.due east., "open up-source is what is free to access by all. Anyone tin change and distribute its own model".
In that location are and then many blogs available on the internet to learn nigh open up source, software, and their importance. The well-nigh common and widely used platform to use for open source is Git and GitHub.
The purpose of Git is to manage a project, or a set of files, as they change over time. Git stores this information in a data structure called a repository. A git repository contains, amongst other things, the following: A set of commit objects.
GitHub is a Git repository hosting service, just it adds many of its own features. While Git is a command-line tool, GitHub provides a Web-based graphical interface. It also provides access control and several collaboration features, such equally wikis and bones chore management tools for every project.
Let's discuss some command used in git to push, pull, commit and do changes to your GitHub repository.
- First, 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 go to Git Bash software and apply this command to clone this repository to your PC.
git clone [your copy link]
- Git Bash don't utilize ctrl+5 to paste any segment so paste your link by using shift+Ins central
- Now you lot accept cloned your Github repository to your system now add all yous relevant codes in that cloned directory to upload it to your GitHub Profile.
- Now when you will type command git status you lot will see all those files you have added to the directory in red-colored untracked file segment like this. Here laddu.txt is the unracked file that I have but moved to the directory.
- Now to add together these files into staging area (Staging is a pace earlier the commit process in git. That is, a commit in git is performed in 2 steps: staging and really commit. As long every bit a changeset is in the staging surface area, git allows you to edit it as you like to replace staged files with other versions of staged files, remove changes from staging, etc.) apply command
git add <files_Name with their respective extensions>
- Here you can see that now your files are successfully added to the staging surface area. Now you demand to commit these files with a clarification. And to do then use
git commit -m "Your description"
- Now we have committed these changes in our local system and to upload these changes to our remote contour utilise command
git remote -v
- Great, Now 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
Great You take successfully uploaded your files to your GitHub repository.
All the files and directories are uploaded to your Github business relationship. Now you can manage, revert, access or exercise any changes in your repositories like this.
hildebrandwitimpet.blogspot.com
Source: https://www.geeksforgeeks.org/how-to-upload-a-project-on-github/
0 Response to "How to Upload a Java File to Github"
Post a Comment