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

Commit512b5bf

Browse files
committed
cleaned up typos + formatting
1 parent67c0d2c commit512b5bf

File tree

1 file changed

+33
-27
lines changed

1 file changed

+33
-27
lines changed

‎README.md‎

Lines changed: 33 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,65 @@
11
<imgsrc="https://devmounta.in/img/logowhiteblue.png"width="250"align="right">
22

3-
learn-git!
3+
learn-git
44
=========
5-
* This project will consist of three separate mini-projects to get you comfortable with the kinds of activities you'll be using git for throughout the class.
6-
* The first mini-project you'll be mimicking the steps you'll take when you first start your personal project. Creating a repository, linking it to your computer, then pushing those changes up to your github.
7-
* The second mini-project you'll be mimicking the steps you'll take with every DevMountain project you do. You'll 'fork' the DevMountain repository, link your computer with your fork, then pushing those changes up to your github.
8-
* The last mini-project you'll be mimicking the steps you'll take when it's group project period. You'll fork your groups repo, link your computer with your fork, push changes to your github, then make a 'Pull Request' into your groups repo.
5+
6+
##Objective
7+
Practice using git + Github
8+
9+
This project will consist of three separate mini-projects to get you comfortable with the kinds of activities you'll be using git for throughout the class.
10+
11+
In the first mini-project, you'll be mimicking the steps you'll take when you first start your personal project. Creating a repository, linking it to your computer, then pushing those changes up to your GitHub.
12+
13+
In the second mini-project, you'll be mimicking the steps you'll take with nearly every DevMountain project you do. You'll 'fork' the DevMountain repository, link your computer with your fork, then pushing those changes up to your GitHub.
14+
15+
Finally, in the last mini-project you'll be mimicking the steps you'll take during the group project portion. You'll fork your group's repo, link your computer with your fork, push changes to your GitHub, then make a 'Pull Request' into your group's repo.
916

1017
##Mini-Project 1: Personal Project
18+
1119
###Step 1: Create a Repository on Github
12-
*Let'sjump ahead a month or two and pretend like we justgot topersonalproject period. You're going to be pushing your code up togithub frequently. In order to do that, you first need to create a repository ongithub to push to. Head over to yourgithub account then in the top righthand 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 justreachedpersonalprojects. You're going to be pushing your code up toGitHub frequently. In order to do that, you first need to create a repository onGitHub to push to. Head over to yourGitHub 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.
1321

1422
###Step 2: Set up the Origin
15-
*Once you create your repository, you'll need to connect that repository with your code on your computer.
23+
Once you create your repository, you'll need to connect that repository with your code on your computer.
1624
* 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.
17-
* 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 do git init! )
18-
* 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 create what is called a remote. Basically we tell our computer 'Hey computer, I created this repo
19-
on github, 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]``` with[Repository URL] being replaced. 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.
20-
21-
###Step 3: Push your code to github
22-
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.
25+
* 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.
2327

24-
The process I always take is one that looks like this:
28+
###Step 3: Push your code to GitHub
29+
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.
2530

26-
1.```git status``` --> this will show me what files have been changed. I want to make sure not to add any files to github that I don't want there
27-
2.```git diff``` this will show me the actual code that has been changed. Again, I want to make sure I don't push anything to github that shouldn't be there
28-
3. If everything looks good```git add nameOfMyFile.js``` I add my file(s) to the 'staging area'
29-
4.```git commit -m "The sentence I want associated with this commit message"``` which tells my computer 'hey, next time code is pushed to github, take all of this code with it.
30-
5.```git push origin master``` and MAGIC. My code is now on github.
31+
This usually looks like this:
3132

32-
* If all goes well, check your github repository for your new code.
33+
1.`git status` --> this will show what files have been changed. We want to make sure not to add any files to GitHub that we don't want there.
34+
2.`git diff` this will show the actual code that has been changed. Again, we want to make sure we don't push anything to GitHub that shouldn't be there.
35+
3. If everything looks good,`git add nameOfMyFile.js` This adds our file(s) to the 'staging area'
36+
4.`git commit -m "The sentence I want associated with this commit message"` which tells your computer 'hey, next time code is pushed to GitHub, take all of this code with it.'
37+
5.`git push origin master` My code is now on GitHub.
3338

39+
* If you did this correctly, check your GitHub repository for your new code.
3440

3541
##Mini-Project 2: DevMountain Project
36-
* Now what we're going to do is walk through how you would normally treat a project herefrom DevMountain.
42+
* Now what we're going to do is walk through how you would normally treat aday'sproject hereat DevMountain.
3743

3844
###Step 1: Fork the Repo
39-
First, you'll want to 'fork'this repo. On the top right of this page you should see a button that says 'fork'. What this is going to do isessentially copy all of the code from this repository, but make it as arepounder your account. As you can imagine, you can't push directly to theDevMtn repo because that would not secure forDevMtn. But whatyoucan 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 willessentially copy all of the code from this repository, but make it as anew repositoryunder your account. As you can imagine, you can't push directly to theDevMountain repo, because that would not secure forDevMountain (anyone could make any changes they want). Whatyoushould do is create a fork of this repo, then push to your own fork because it's under your own account.
4046

4147
###Step 2: Clone the Fork
42-
* 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 that's on the side under where it says "HTTPS clone URL". Then, head over to your terminal and type```git clonepasteTheUrlHere```. This takes what's ongithub, and essentially downloads it so you can now make changes to it on your local computer.
43-
* 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 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.
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 that's on the side 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 onGitHub and essentially downloads it so you can now make changes to it on your local computer.
49+
* 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 outlinedabovein 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.
4450

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

4854
###Step 1: Re-clone Your Fork
4955
* Re-clone your fork of this project to your local computer, make a change, add, commit, then push that change.
5056

51-
* Go to your forked repo ongithub and verify your change is there.
57+
* Go to your forked repo onGitHub and verify your change is there.
5258

53-
>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.We fixed this solution withthings called'Pull Requests'. Basically you fork a project, make changes to your fork, then you make apull requestback into the original project requesting that some piece of code be added to the original repo. This is how open source projects work.
59+
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 aPull Request (PR)back into the original project requesting that some piece of code be added to the original repo. This is howthe vast majority ofopen source code projects work.
5460

5561
###Step 2: Make the PR
56-
* 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 the submit button to submit your pull request.
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 the submit button to submit your pull request.
5763
* Now, I should see your pull request and I can decide if I want to add that code into the main project or not.
5864

5965
##Contributions

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp