在github上创建一个repository

首先给大家推荐一下我老师大神的人工智能教学网站。教学不仅零基础,通俗易懂,而且非常风趣幽默,还时不时有内涵黄段子!点这里可以跳转到网站

1、进入https://github.com/主页,点击创建repository

2、填写必备信息,点击create repository

3、创建成功的页面

4、打开git bash,创建gifviewr工作路径,然后clone你的工程。工程路径在页面的右下角

命令如下:

创建目录

mkdir gifviewer

clone代码

git clone https://github.com/tanqiantot/gifviewer.git

成功后可以看到两个文件:

ls -a

.git  REDME.md

5、尝试push一个修改到remote

1)首先修改README.md

2)git status

$ git status
# On branch master
# Changes not staged for commit:
#   (use “git add <file>…” to update what will be committed)
#   (use “git checkout — <file>…” to discard changes in working directory)
#
#       modified:   README.md
#

3)$ git add README.md

4)再次git status

$ git status
# On branch master
# Changes to be committed:
#   (use “git reset HEAD <file>…” to unstage)
#
#       modified:   README.md
#

5)git commit

$ git commit -m “test1”

[master 015b40b]

test1
 1 file changed, 2 insertions(+) 

6)git push

$ git push  https://github.com/tanqiantot/gifviewer.git master
Username for ‘https://github.com’: tanqiantot
Password for ‘https://tanqiantot@github.com’:
Counting objects: 5, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 307 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
To https://github.com/tanqiantot/gifviewer.git
   ad8ff9c..015b40b  master -> master

7)查看github网站,发现你的修改已经提交成功。

点这里可以跳转到人工智能网站

发表评论