patiltanaji / github-slideshow

A robot powered training repository :robot:
https://lab.github.com/githubtraining/introduction-to-github
MIT License
0 stars 0 forks source link

Your first contribution #2

Open github-learning-lab[bot] opened 3 years ago

github-learning-lab[bot] commented 3 years ago

Introduction to GitHub flow

Now that you're familiar with issues, let's use this issue to track your path to your first contribution.

People use different workflows to contribute to software projects, but the simplest and most effective way to contribute on GitHub is the GitHub flow.

:tv: Video: Understanding the GitHub flow


Read below for next steps

github-learning-lab[bot] commented 3 years ago

Step 4: Create a branch

Let’s complete the first step of the GitHub flow: creating a branch :book:.

Creating a branch ## Creating a branch :tv: [Video: Branches](https://www.youtube.com/watch?v=xgQmu81G1yY) You just learned how to create a branch—the first step in the GitHub flow. Branches are an important part of the GitHub flow because they allow us to separate our work from the `main` branch. In other words, everyone's work is safe while you contribute. ### Tips for using branches A single project can have hundreds of branches, each suggesting a new change to the `main` branch. The best way to keep branches organized with a team is to keep them concise and short-lived. In other words, a single branch should represent a single new feature or bug fix. This reduces confusion among contributors when branches are only active for a few days before they’re merged [:book:](https://help.github.com/articles/github-glossary/#merge) into the `main` branch.

:keyboard: Activity: Your first branch

  1. Open your preferred command line interface, which we'll call your shell from now on.
  2. Clone this repository:
      git clone https://github.com/patiltanaji/github-slideshow.git
  3. Navigate to the repository in your shell:
      cd github-slideshow
  4. Create a branch, use whatever name you like. Feel free to use the suggested name below.
      git branch my-slide
  5. Push the branch to GitHub:
      git push --set-upstream origin <BRANCH-NAME>

I'll respond when I detect a new branch has been created in this repository.

github-learning-lab[bot] commented 3 years ago

Step 5: Commit a file

:tada: You created a branch!

Creating a branch allows you to make modifications to your project without changing the deployed main branch. Now that you have a branch, it’s time to create a file and make your first commit!

Commits 101 ## Commits 101 When you’re finished creating or making changes to a file on GitHub, scroll to the bottom of the page. Then find the "Commit new file" section. In the first field, type a commit message. The commit message should briefly tell contributors about the changes you are introducing to the file. ### Rules to live by for commit messages: - Don’t end your commit message with a period. - Keep your commit messages to 50 characters or less. Add extra detail in the extended description window if necessary. This is located just below the subject line. - Use active voice. For example, "add" instead of "added" and "merge" instead of "merged". - Think of your commit as expressing intent to introduce a change.

:keyboard: Activity: Your first commit

The following steps will guide you through the process of committing a change on GitHub.

  1. Check out to your branch:
      git checkout my-slide
  2. Create a new file named _posts/0000-01-02-patiltanaji.md.
  3. Add the following content to your file:
      ---
      layout: slide
      title: "Welcome to our second slide!"
      ---
      Your text
      Use the left arrow to go back!
  4. Stage your new file:
      git add _posts/0000-01-02-patiltanaji.md
  5. After adding the text, commit the change while providing a commit message. For guidelines on commit messages, check out the Commits 101 drop-down, just above these instructions:
      git commit -m "<YOUR-MESSAGE>"
  6. Push your new commit to GitHub:
      git push

I'll respond when I detect a new commit on this branch.