-
Notifications
You must be signed in to change notification settings - Fork 98
Expand file tree
/
Copy pathindex.html
More file actions
78 lines (61 loc) · 5.18 KB
/
index.html
File metadata and controls
78 lines (61 loc) · 5.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=">
<link rel="stylesheet" href="../../style.css">
<script
src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.6.0/gsap.min.js"
async
></script>
<script
src="../../js/text-bounce.js"
async
></script>
<title>Git</title>
</head>
<div class="body">
<!-- Title goes below: -->
<h1>Advanced: Pull Requests, Rebasing and Guidelines: Contributing to Open Source</h1>
<!-- Content here: -->
<p>Git is great to know for software development generally, but it's also used by many <a href="https://www.digitalocean.com/community/tutorial_series/an-introduction-to-open-source" target="_blank">open-source projects.</a> An essential part of the learning how to code is working on actual projects and codebases and a great way to do that is contributing to open-source projects. Before you jump in feet first into a project and start hacking away it's really important to know some basic guidelines for contributing to open-source.</p>
<h2>Pull Requests</h2>
<p>We mentioned <a href="https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests" target="_blank">pull requests</a> briefly in the first section of this module, but to recap: A pull request is when a contributor asks to merge a branch of development with another branch. This involves the maintainers of the second branch to review and comment on the contributor's code. Sometimes, a pull request is approved and the contributor's branch is merged into the other branch. A pull request typically contains the files to be changed if the two branches were to merge, description of what those changes are / accomplish, and a forum of some sort for the different parties to discuss the pull request. Remember, a pull request is not a part of the core Git software, but rather is a feature of Git services like Github or Gitlab.</p>
<p>Pull requests are a big part of collaborating on Github and other Git services. </p>
<ul>
<li>
<a href="https://guides.github.com/activities/hello-world/"target="_blank">Github Hello World</a>
</li>
<li>
<a href="https://dev.to/scienta/get-changed-files-in-github-actions-1p36
"target="_blank">Get changed files in github actions</a>
</li>
<li>
<a href="https://akshayranganath.github.io/Git-Pull-Handling-Merge-Conflict/
"target="_blank">Handling a Git Pull request with merge conflict</a>
</li>
</ul>
<h2>Rebasing</h2>
<p>In the process of a pull request, you might realize something in your branch is wrong. The process of undoing, fixing or removing commits is called <b>rebasing</b>. It's best practice to change a Git project by another commit, rather than trying to rework a previous commit. However, sometimes it can't be avoided. Here are some resources to help in those times:</p>
<ul>
<li><a href="https://sethrobertson.github.io/GitFixUm/fixup.html" target="_blank">Undoing, Fixing, or Removing Commits in Git</a> A "Git Choose-Your-Own-Adventure," this is a nice, simple site that asks questions about your rebasing situation and recommends a solution.</li>
<li><a href="https://dangitgit.com/en" target="_blank">Dang it, Git!</a> A less profane version of a popular Git troubleshooting guide.</li>
<li><a href="https://github.blog/2015-06-08-how-to-undo-almost-anything-with-git/" target="_blank">How to Undo (Almost) Anything with Git</a> Lays out a series of scenarios and suggests ways of undoing the error.</li>
</ul>
<h2>Contributor Guidelines</h2>
<p>Developers need to be aware of the different requirements for community guidelines. Good first steps are:
<ul>
<li>Join the <a href="http://www.discord.com" target="_blank">Discord</a> or <a href="https://gitter.im/" target="_blank">Gitter</a> for the repository, project or team</li>
<li>Ask for guidance to good first issues if they’re not properly marked</li>
<li>Read up on community contributor guidelines. For example, here is Go-Ethereum's <a href="https://geth.ethereum.org/docs/developers/geth-developer/contributing" target="_blank">Community Contributor page</a> and their <a href="https://geth.ethereum.org/docs/developers/geth-developer/code-review-guidelines" target="_blank">Code Review Guidelines</a></li>
<li>Read through open <i>and</i> closed Pull Requests. In the Pull Request section, you can find all Pull Requests. Click through a few and see if you can understand how the project processes Pull Requests.</li></ul></p>
<!-- <h2>Git Trunk Development</h2> -->
<!-- Be sure to alter the link below to add in correct Module and Lesson Number -->
<div class="footer">
<a href="https://github.com/ConsenSys-Academy/basic-training/edit/main/M5-git/L6/index.html" target="_blank">Edit this page on Github</a>
<div class="discord">
<img class="discord-logo" src="../../img/discord.svg" alt="Discord logo" ><a href="https://discord.gg/FrHSjSn9dX" target="_blank">Questions? Ask on Discord! </a>
</div>
</div>
</div>
</html>