ππππ
ππππ
- Introduction
- What will you Learn?
- What is GitHub?
- No Coding Necessary
- How to start?
- Why this Training
- License
- Star this Repo
- Celebrate!
-
The Hello World project Training is hosted by Shreya Malogi , is a time-honored tradition in computer programming. It is a simple exercise that gets you started when learning something new. Letβs get started with GitHub! π
-
By the end of this training, you will be able to make your own Codecosmers rep0,
-
P.S : CodeCosmers are the Stakeholders in Codemacrocosm
-
Enjoy your journey into GitHub! πβ¨
- Create and use a repository π
- Start and manage a new branch πΏ
- Make changes to a file and push them to GitHub as commits π»
- Open and merge a pull request π
GitHub is a code hosting platform for version control and collaboration. It lets you and others work together on projects from anywhere. π
This tutorial teaches you GitHub essentials like repositories, branches, commits, and Pull Requests. Youβll create your own Hello CodeCosmers repository and learn GitHubβs Pull Request workflow, a popular way to create and review code. π
To complete this tutorial, you need a GitHub.com account and Internet access. You donβt need to know how to code, use the command line, or install Git (the version control software GitHub is built on). π
Tip: Open this guide in a separate browser window (or tab) so you can see it while you complete the steps in the tutorial. π
Click here
A repository is usually used to organize a single project. Repositories can contain folders and files, images, videos, spreadsheets, and data sets β anything your project needs. We recommend including a README, or a file with information about your project. GitHub makes it easy to add one at the same time you create your new repository. π
Your hello-CodeCosmers
repository can be a place where you store ideas, resources, or even share and discuss things with others. π€
- To create a new repository π
- In the upper right corner, next to your avatar or identicon, click and then select New repository. π
- Name your repository
hello-CodeCosmers
. π - Write a short description. π
- Select Initialize this repository with a README. π
Click Create repository. π
Branching is the way to work on different versions of a repository at one time. π
-
By default, your repository has one branch named
master
which is considered to be the definitive branch. We use branches to experiment and make edits before committing them tomaster
. π¨ -
When you create a branch off the
master
branch, youβre making a copy, or snapshot, ofmaster
as it was at that point in time. If someone else made changes to themaster
branch while you were working on your branch, you could pull in those updates. π -
This diagram shows:
-
The
master
branch π -
A new branch called
feature
(because weβre doing βfeature workβ on this branch) π -
The journey that
feature
takes before itβs merged intomaster
π
Have you ever saved different versions of a file? Something like:
story.txt
πstory-shreya-edit.txt
βοΈstory-shreya-edit-reviewed.txt
π
Branches accomplish similar goals in GitHub repositories. π
-
Here at GitHub, our developers, writers, and designers use branches for keeping bug fixes and feature work separate from our
master
(production) branch. When a change is ready, they merge their branch intomaster
. π€ -
To create a new branch πΏ
- Go to your new repository
hello-CodeCosmers
. π - Click the drop down at the top of the file list that says branch: master. πΏ
- Type a branch name,
readme-edits
, into the new branch text box. π - Select the blue Create branch box or hit βEnterβ on your keyboard. π
- Now you have two branches,
master
andreadme-edits
. They look exactly the same, but not for long! Next, weβll add our changes to the new branch. π
-
Bravo! Now, youβre on the code view for your
readme-edits
branch, which is a copy ofmaster
. Letβs make some edits. π» -
On GitHub, saved changes are called commits. Each commit has an associated commit message, which is a description explaining why a particular change was made. Commit messages capture the history of your changes, so other contributors can understand what youβve done and why. π
-
Make and commit changes π
-
- Click the
README.md
file. π
- Click the
-
- Click the pencil icon in the upper right corner of the file view to edit. βοΈ
-
- In the editor, write a bit about yourself. π€
-
- Write a commit message that describes your changes. π
-
- Click Commit changes button. π
- These changes will be made to just the README file on your
readme-edits
branch, so now this branch contains content thatβs different frommaster
. π
-
Nice edits! Now that you have changes in a branch off of
master
, you can open a pull request. π -
Pull Requests are the heart of collaboration on GitHub. When you open a pull request, youβre proposing your changes and requesting that someone review and pull in your contribution and merge them into their branch. Pull requests show diffs, or differences, of the content from both branches. The changes, additions, and subtractions are shown in green and red. π
-
As soon as you make a commit, you can open a pull request and start a discussion, even before the code is finished. π
-
By using GitHubβs @mention system in your pull request message, you can ask for feedback from specific people or teams, whether theyβre down the hall or 10 time zones away. π
You can even open pull requests in your own repository and merge them yourself. Itβs a great way to learn the GitHub Flow before working on larger projects. π
- Open a Pull Request for changes to the README π
Click on the image for a larger version π
- When youβre done with your message, click Create pull request! π
Tip: You can use emoji and drag and drop images and gifs onto comments and Pull Requests. π
- In this final step, itβs time to bring your changes together β merging your
readme-edits
branch into themaster
branch. π
- Click the green Merge pull request button to merge the changes into
master
. π - Click Confirm merge. π
- Go ahead and delete the branch, since its changes have been incorporated, with the Delete branch button in the purple box. β
Whether you're a coding novice or an experienced developer looking to enhance your GitHub skills, this hands-on experience is tailored to ensure effective learning. This training provides a comprehensive understanding of GitHub's fundamental concepts and workflows. From creating repositories to making pull requests, you'll gain practical insights that are valuable for both beginners and seasoned developers. Join us on this coding adventure and elevate your collaboration game! ππ»πππ
This repository is open-source and distributed under the MIT License.
MIT License
Copyright (c) 2020 CodeMacrocosm
If you find this training program helpful and valuable, don't forget to star this repository to show your support!
By completing this training, youβve learned to create a project and make a pull request on GitHub! π
Hereβs what you accomplished in this tutorial:
- Created an open-source repository π
- Started and managed a new branch πΏ
- Changed a file and committed those changes to GitHub π»
- Opened and merged a Pull Request π
Take a look at your GitHub profile, and youβll see your new contribution squares! π
To learn more about the power of Pull Requests, we recommend reading the GitHub Flow Guide. You might also visit GitHub Explore and get involved in an Open Source project
We hope you find these resources engaging and beneficial. If you have any questions or suggestions, feel free to reach out.
Happy Learning! π