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

Commitfedb059

Browse files
committed
Add MiniProject 1
1 parent230542e commitfedb059

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

‎README.md‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,23 @@ learn-git
88
##Mini-Project 1: Personal Project
99
###Step 1: Create a Repository on Github
1010
* Let's jump ahead a month or two and pretend like we just got to personal project periods. Because you're not an idiot, 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.
11-
###Step 2: Set up the Upstream
11+
12+
###Step 2: Set up the Origin
1213
* Once you create your repository, you'll need to connect that repository with your code on your computer.
1314
* 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.
1415
* 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.
15-
* Now that you've initialzied 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 an 'upstream'.
16+
* Now that you've initialzied 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 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 https://github.com/nameOfYourRepo.git``` with nameOfYourRepo being replaced with what you named your repository. 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.
17+
* 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. The process I always take is one that looks like this.
18+
*```git status``` --> this will show me what files have been changes. I want to make sure not to add any files to github that I don't want there
19+
*```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
20+
* If everything looks good```git add nameOfMyFile.js``` I add my file(s) to the 'staging area'
21+
*```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.
22+
*```git push origin master``` and MAGIC. My code is now on github.
23+
24+
###Step 3: Push your code to github
25+
* Follow the steps I did above in order to get your new code on your computer up to your github repository.
26+
* If all goes well, check your github repository for your new code.
27+
1628

1729
##Mini-Project 2: DevMountain Project
1830
###Step 1:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp