hackforla / hackforla/website

Update CONTRIBUTING.md Section "1.2: Installing Git" to Include Adding Configuration Settings

Open
#8,233 0 comments 0 reactions 0 assignees View on GitHub
Complexity: Small Feature: Onboarding/Contributing.md ready for dev lead role: back end/devOps role: front end size: 0.5pt
Dominant language
JavaScript
Stars
363
Forks
872
Avg merge
2d 21h
Merged PRs (30d)
18

Description

### Prerequisite
1. Be a member of Hack for LA. (There are no fees to join.) If you have not joined yet, please follow the steps on our [Getting Started page](https://www.hackforla.org/getting-started) and attend an onboarding session.
2. Before you claim or start working on an issue, please make sure you have read our [How to Contribute to Hack for LA Guide](https://github.com/hackforla/website/blob/7f0c132c96f71230b8935759e1f8711ccb340c0f/CONTRIBUTING.md).

### Overview
We need to add a new section 1.2.1 to configure essential Git settings for contributors to prevent the "divergent branches" error that occurs when using git pull commands and to ensure proper Git identity configuration for all repository contributions.

### Action Items
- [ ] In your local IDE, navigate to `CONTRIBUTING.md`
- [ ] After section `1.2 Dev setup (2) : Installing Git`, before `[Back to Table of Contents](#table-of-contents)`, add the following new section:
````
#### **1.2.a Configure Git Settings**

After installing Git, you will need to configure essential settings that will apply to all your Git repositories.

In your command line interface (Terminal, Git Bash, Powershell), enter the following commands to set your Git identiy using your GitHub account information:

```bash
git config --global user.name "Your Full Name"
git config --global user.email "your_email@example.com"
```
**NOTE:** Replace "Your Full Name" with your actual name and "your_email@example.com" with the email address associated with your GitHub account.

To prevent divergent branch warnings during development, configure the strategy for git pulls with **ONLY ONE** of the following commands:

```bash
# Recommended -- "fast forward" only to avoid unrequested merge or rebase
git config --global pull.ff only

# Alternate dev options (automatic fallbacks if "fast forward" is not possible)
git config --global pull.rebase false # performs merge during pull to reconcile branches
git config --global pull.rebase true # performs rebase during pull to reconcile branches
```
````
- [ ] Update the Table of Contents to include the new section:
- Find the line: ` - [**1.2 Dev setup (2): Installing Git**](#12-dev-setup-2-installing-git)`
- Add below it: ` - [**1.2.a Configure Git Settings**](#12a-configure-git-settings)` (ensure subsection indentation)
- [ ] With CONTRIBUTING.md still open, make a note of the sections in which modified content appears, so that you will know where to look in the document to preview the change.
- [ ] Changes to CONTRIBUTING.md cannot be tested locally, rather they must be tested after pushing the issue branch to your fork of the repository. Push your issue branch in the usual manner, but before creating the Pull Request, check your updates using this test URL. Also store the test URL for use in a later step:

```
https://github.com/[REPLACE WITH GITHUB HANDLE]/website/blob/[REPLACE WITH NAME OF ISSUE BRANCH]/CONTRIBUTING.md
```
(for example: https://github.com/bonniewolfe/website/blob/issue-branch-1234/CONTRIBUTING.md)
- [ ] Create a pull request with your changes. In the Pull Request, after the "Why did you make the changes" section, add this line to help reviewers, replacing the text in brackets (and the brackets) with the test URL from the previous Action Item.
```
For Reviewers: Do not review changes locally, rather, review changes at [REPLACE WITH TEST URL]
```

### Resources/Instructions
[CONTRIBUTING.md](https://github.com/hackforla/website/blob/gh-pages/CONTRIBUTING.md)
[Getting started with writing and formatting on GitHub](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github)
[Git pull documentation](https://git-scm.com/docs/git-pull)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.