Skip to content

Latest commit

 

History

History
163 lines (103 loc) · 4.44 KB

hw2.md

File metadata and controls

163 lines (103 loc) · 4.44 KB

Hacktoberfest Week 2!

Hacktober Fest Image

Note

Before continuing make sure that git is installed on your machine!! There are plenty of resources out there such as...

While both are helpful tutorials, you might run into some problems. If so you are more than welcome to stop by our Slack channel for some one on one help.


Step 1

Signing up by linking your Github account will make sure that DigitalOcean can track any pull requests you make. The goal for us is to make 4 pull requests. It does not matter if you're fixing a complex problem or simply editing the documentations. The goal of Hacktoberfest is to learn how you can support any opensource project.

Step 2

Some projects out there are simple and beginner friendly. If you are looking for an easy issue to fix, you could always check out our Websites Github Link. There should be some easy to fix HTML/CSS fixes that you can pull.

Step 3

Fork The Repository

Forking an issue creates a copy of the repo on your account. In otherwords, all the code gets copied to your Github account allowing you to mess with it anyway you want. The next step is to get that code onto your computer!

Image of Fork Button

Step 4

Download The Code

To download your fork, copy the url address or click on the green "Clone or Download" button and copy that url.

Image of Download

Then on your terminal, cd to the destination you want to download the code to and run...

  git clone https://github.com/PyMavs/pymavs.github.io.git

but with the URL you copied.

Step 5

Fix the issue

Check the documentation page to see how to run the code, then find the issue and fix it!

Step 6

Commit Your Changes

By commiting, we are saving everything we changed on our computer. To do this run

git add .
git commit -m "Your message goes here inside the quotes"

git add . adds everything that you edited git commit -m "string goes here" saves your changes with the string describing what you did. Make sure the message is descriptive!

Step 7

Pull Request

The final step is to finally make a pull request.

Pull Request Image


High level view of Git version control:

Git Flowchart

Git Commands

To add your git credentials and login information (Do this first if you haven't yet!)

git config --global user.name "FirstName LastName"

git config --global user.email your.name@mail_server.domain.com

Make sure this information matches what is on your Github account!

Initialize a new local repository (only do this if you are starting from scratch)

git init

Check your repo status

git status

View changes

git log

View changes (with more detail)

git log --summary

Preview changes before merging

git diff [source] [target]

To clone a repository

git clone https://github.com/Path/toRepository.git

Of course, use the real URL that corresponds to the project or repository you want to work with.

Add all new and changed files to the staging area

git add -A

or

git add .

To commit and save

git commit -m "[enter your comments or description of the changes here]"

Add a single file to the staging area

git add [file-name-goes-here.extension]

Push a branch to your remote respository

git push origin

Update a local repository to the newest commit of the remote repository

git pull