by Mohd Sohail
LXer Linux News / 2017-08-22 21:34
Individual projects can also be easily handled with the aid of GitHub as it provides essential tools for projects handling. It also makes it easier to share one’s project with the world.
Signing Up for GitHub and Starting a Project
When starting a new project on GitHub, you must first create an account here using your email address.
Then, on verification of the address, the user will be automatically logged into their GitHub account.
1. Creating a Repository
- After filling the “Repository Name” and filling the “Short Description”
- Check the “Initialize this repository with a README”.
- Finally, click the “Create Repository” button at the bottom.
2. Adding a Branch
For personal suitability, it is always necessary to add several other branches to suit different projects. Creating a branch off the master branch is the same as copying the master as it was at that instant.
Branches also prove useful in keeping bug fixes and feature work separated from the master branch. After necessary changes, these branches are merged into the master branch.
To make a branch after creating the repository;
- Go to your new repository by clicking on the repository name in this case, “Hello-World”.
- Click on the “Branch-Master” button at the top to see a drop-down menu with a blank field for filling the branch name.
- Enter the branch name, in this case, ”readme-edits”.
- Press “Enter” or click on the blue “create- branch” box
By now two branches have been created; master and readme-edits.
3. Making and Committing Changes
To make and commit changes to a repository, the following are the steps;
- Click on the repository name “Hello-World”.
- To view and edit the file, click on the pencil icon in the upper right corner.
- In the editor, write something to ascertain that you can make changes.
- Write briefly in the commit message field to explain why and how the changes were made.
- Click on commit changes button to save the changes.
Please note that these changes only affect the readme-edits branch and not the master branch.
4. Opening a Pull Request
To open a pull request:
- Click the pull request tab.
- Select the readme-edits branch to compare with the master.
- Determine the requirements and be sure it is what you want to submit.
- Click on the create pull request green button and assign it a title.
- Press enter.
The user can demonstrate this by trying to create and saving a pull request.
5. Merging the Pull Request
This final step involves bringing readme-edits and master branches together. The merge Pull button shows up in case the readme-edits and the master branch do not conflict.
- Click on the merge pull request button.
- Confirm the merge.
- Press the purple delete branch button to delete the readme-edits branch since it is already incorporated in the master.
This article provides a simple guideline to getting started with GitHub and other basic operations of the GitHub platform.
—
Shared via Inoreader
iPhoneから送信