Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3e4c384

Browse files
authored
Merge pull requestDevMountain#501 from smrtsmrf/master
clarify instructions (and one grammar fix)
2 parents03a4f1e +db82d13 commit3e4c384

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

‎README.md‎

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ Finally, in the last mini-project you'll be mimicking the steps you'll take duri
1717
##Mini-Project 1: Personal Project
1818

1919
###Step 1: Create a Repository on Github
20-
Let's jump ahead a month or two and pretend like we just reached personal projects. You're going to be pushing your code up to GitHub frequently. In order to do that, you first need to create a repository on GitHub to push to. Head over to your GitHub account, then in the top right-hand corner click the '+' button and click 'New repository'. Enter the name of your repository then click 'Create Repository'. This repository is where your code for this project will now live.
20+
Let's jump ahead a month or two and pretend like we just reached personal projects. You're going to be pushing your code up to GitHub frequently. In order to do that, you first need to create a repository on GitHub to push to. Head over to your GitHub account, then in the top right-hand corner click the '+' button and click 'New repository'. Enter the name of your repository then click 'Create Repository'.Do NOT initialize the repository with a README.This repository is where your code for this project will now live.
2121

2222
###Step 2: Set up the Origin
2323
Once you create your repository, you'll need to connect that repository with your code on your computer.
2424
* Create a folder called 'myProject' then inside that folder create a file called 'myName.js'. Add your name to that file and then save it.
2525
* Now in your terminal, navigate to your 'myProject' folder. Once inside that folder, type`git init`. You've just told your computer that you want git to watch the 'myProject' folder and keep track of any changes; basically making it so you can now run git commands inside of this folder. (Warning: Be very careful to make sure you're in the right directory when you run`git init`!)
26-
* Now that you've initialized your 'myProject' folder, we need to tell your computer where the location of your GitHub repository is. To do this you'll create what is called a remote. Basically, we tell our computer "Hey, I created this repo on GitHub, so when I push, I want my code to go to this GitHub repo." To do this, in your terminal type`git remote add origin [Repository URL]` replacing[Repository URL] with your repo's url. To get the url, open the repository you made in step 1 in the browser. Then copy the url out of the address bar. Now whenever you run`git push origin master` your computer knows that origin is pointing to your repo you made on GitHub and it pushes your changes there.
26+
* Now that you've initialized your 'myProject' folder, we need to tell your computer where the location of your GitHub repository is. To do this you'll create what is called a remote. Basically, we tell our computer "Hey, I created this repo on GitHub, so when I push, I want my code to go to this GitHub repo." To do this, in your terminal type`git remote add origin [Repository URL]` replacing[Repository URL] with your repo's url. To get the url, open the repository you made in step 1 in the browser. Then copy the url out of the address bar. Now whenever you run`git push origin master` your computer knows that origin is pointing to your repo you made on GitHub and it pushes your changes there.(If you accidentally DID initialize your repository with a README, you must do a`git pull origin master` first - to get the README file on your computer - before you'll be able to push.)
2727

2828
###Step 3: Push your code to GitHub
2929
Now that our remote is set up, you'll need to add your files to the staging area, commit your files to be ready for pushing, then push your files.
@@ -42,24 +42,31 @@ This usually looks like this:
4242
* Now what we're going to do is walk through how you would normally treat a day's project here at DevMountain.
4343

4444
###Step 1: Fork the Repo
45-
First, you'll want to 'fork' the repo. On the top right of this page, you should see a button that says 'fork.' This will essentially copy all of the code from this repository, but make it as a new repository under your account. As you can imagine, you can't push directly to the DevMountain repo, because that would not secure for DevMountain (anyone could make any changes they want). What you should do is create a fork of this repo, then push to your own fork because it's under your own account.
45+
First, you'll want to 'fork' the repo. On the top right of this page, you should see a button that says 'fork.' This will essentially copy all of the code from this repository, but make it as a new repository under your account. As you can imagine, you can't push directly to the DevMountain repo, because that would notbesecure for DevMountain (anyone could make any changes they want). What you should do is create a fork of this repo, then push to your own fork because it's under your own account.
4646

4747
###Step 2: Clone the Fork
48-
* Once you've forked this repo, you're going to want to clone your forked repository. Go to your freshly forked page and copy the urlthat's on theside under where it says "HTTPS clone URL". Then, head over to your terminal and type`git clone [Repository URL]`, replacing Repositry URL with the URL you just grabbed from GitHub. This takes what's on GitHub and essentially downloads it so you can now make changes to it on your local computer.
48+
* Once you've forked this repo, you're going to want to clone your forked repository. Go to your freshly forked page and copy the url(click on thegreen "clone or download" button on the right). Then, head over to your terminal and type`git clone [Repository URL]`, replacing Repositry URL with the URL you just grabbed from GitHub. This takes what's on GitHub and essentially downloads it so you can now make changes to it on your local computer.
4949
* Once you've cloned your fork, open up your fork in Sublime Text and make a change. Once you've made a change head over to your terminal and type`git status`, you should see that a file has been changed. If you see the file, run through the steps outlined above in Mini-Project 1 (status, diff, add, commit, push). Note that when you run`git push origin master` in this repository, origin is already pointing to your forked repo since you used`git clone`. Unlike the last step, you don't need to tell your computer where to push your code because git already knows.
5050

5151
##Mini-Project 3: Group Project
5252
* We're essentially going to redo all the same steps we did in Mini-Project 2, but add one more step.
5353

5454
###Step 1: Re-clone Your Fork
55+
56+
Note: to re-clone your fork, you must do one of three things:
57+
1. Delete the folder on your computer, or
58+
2. Rename the folder on your computer, or
59+
3. Rename the second clone by doing```git clone [repo url] [new folder name]```
60+
If you do not do one of these three things, when you try to do a git clone, it will give you an error saying it already exists.
61+
5562
* Re-clone your fork of this project to your local computer, make a change, add, commit, then push that change.
5663

5764
* Go to your forked repo on GitHub and verify your change is there.
5865

5966
Let's imagine we're working in groups. If we have everyone pushing to one repo without verifying the quality of the code, things can get messy pretty quick. GitHub fixed this solution with 'Pull Requests.' Basically, you fork a project, make changes to your fork, then you make a Pull Request (PR) back into the original project requesting that some piece of code be added to the original repo. This is how the vast majority of open source code projects work.
6067

6168
###Step 2: Make the PR
62-
* Go to your forked repo and click where it says 'Pull Request.'It should show you the file changes you've made and how they differ from the original repo. If it does, click on thesubmit button to submit your pull request.
69+
* Go to your forked repoon githuband click where it says 'Pull Request', and click 'New pull request'.It should show you the file changes you've made and how they differ from the original repo. If it does, click on the'create pull request' button to submit your pull request.
6370
* Now, I should see your pull request and I can decide if I want to add that code into the main project or not.
6471

6572
##Contributions

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp