If you are a novice in the world of development, you may not know That upload a project to GitHub, a portal created so that any developer can host the code of their applications, programs or tools in a repository so that other members of the community can download it and even collaborate to improve it and create branches from it.
How to create a repository on GitHub:
With an account on this platform, whose registration is free of charge, you can upload files to GitHub. To do this, create a repository on GitHub to host by following these steps:
Use the drop-down menu in the upper right corner of any page and select New repository.
Enter a name for the repository. You can also add a description to it.
Choose repository visibility: public, internal or private.
Choose Initialize this repository with a README file, which will contain project information and can be edited at any time.
Click on Create repository.
How to upload a project's code to the GitHub repository:
At the bottom of the repository the contents of the README will be displayed (it is convenient to create it and give it the appropriate styles), as well as instructions on how the program works, application or tool and how to launch it.
To upload a previously created code, do the following:
1. Open the terminal in the folder where the source files are stored and type the following code to get started git in that folder:
2. The folder has been created.git with project information. Add the files to upload with this command:
Another way to add a single file is by entering the following command:
git add file name
3. Prepare the files you want to upload with a brief explanation of the changes:
git commit -m “Initial project created”
4. You must upload the changes to GitHub. For this you must know the path of the repository (ending in.git) which is in Clone O Descargar, the green button on the project page. Then add the repository from the terminal with this command:
git remote add origin URLrepository.git
5. load the changes with the following command:
git Push origin Maestro
If you have followed these steps, the changes will appear on the project page, It's easy, truth?
How to upload an on-premises project to GitHub from Visual Studio Code:
Microsoft had the great idea of integrating GitHub into its development environment so that developers could upload their projects seamlessly from Visual Studio.. Code. To do this you must do the following:
Connect to GitHub from Visual Studio Code going to the section Team Explorer, then click on Connection Manager and later in Sign in.
Enter your GitHub username and password.
If you haven't done it before, create a repository for your workspace as you previously saw.
Add your project by double-clicking the repository.
Copy the project response to the workspace path.
Click on Changes and you will see a list showing the files to be included in the repository.
Add a description about the changes and click Commit All.
Sync changes with GitHub to upload files to that platform by clicking Sync up when the confirmation message of Commit.
Press the button Push to start the procedure and you will see a message confirming the publication of the project in the repository.
Log in to the GitHub web portal and log in to your account to check if the project has been successfully uploaded.
If you have followed these steps, your project will have successfully uploaded to GitHub.