码迷,mamicode.com
首页 > 其他好文 > 详细

[Git/GitHub] Tutorial 1. Git download and commit first project

时间:2018-12-10 11:44:08      阅读:157      评论:0      收藏:0      [点我收藏+]

标签:computer   files   txt   config   email   set   tag   oba   download   

 

1. Install at https://git-scm.com/downloads

2. Set up your name and email

  $ git config --global user.name "Johnsonxiong"

  $ git config --global user.email "xiongzhiqiang333@gmail.com"

3. Confirm 2nd step is done

  $ git config —-list

4. Create a folder at local computer “GitHub-tutorial”

5. Open terminal and change path into the folder created last step

  $ cd /Users/johnsonxiong/Documents/GitHub/GitHub-tutorial

6. Initialized empty Git repository

  $ git init

7. Create a GitHub_SpoolUp.txt into the “GitHub-tutorial” folder.

8. Add the GitHub_SpoolUp.txt into the middle stage.

  $ git add GitHub_SpoolUp.txt

9. Commit the change and write comments in the repository.

  $ git commit -m "add a tutorial read file"

10. Check the status of the project. Will be red if not add into the middle stage yet.

Will be green if add into the middle stage.

  $ git status

11. Commit all the change from the local and stage in the repository. (-am means -a -m)

Actually it is add local to stage first, and then commit files in the stage to repository.

  $ git commit -am "change the license file"

[Git/GitHub] Tutorial 1. Git download and commit first project

标签:computer   files   txt   config   email   set   tag   oba   download   

原文地址:https://www.cnblogs.com/Johnsonxiong/p/10094762.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!