yinbodotcc@yay:~/gitproject$ git clone https://github.com/yinbodotcc/fork8sinstall.git
正克隆到 'fork8sinstall'...
warning: 您似乎克隆了一个空仓库。
yinbodotcc@yay:~/gitproject$ cd fork8sinstall/
yinbodotcc@yay:~/gitproject/fork8sinstall$ git config --global user.email "yinbodotcc@aliyun.com"
yinbodotcc@yay:~/gitproject/fork8sinstall$ git config --global user.nam "yay"
yinbodotcc@yay:~/gitproject/fork8sinstall$ mkdir kube-apiserver-amd64
yinbodotcc@yay:~/gitproject/fork8sinstall$ gedit kube-apiserver-amd64/Dockerfile
yinbodotcc@yay:~/gitproject/fork8sinstall$ git status
位于分支 master
尚无提交
未跟踪的文件:
(使用 "git add <文件>..." 以包含要提交的内容)
kube-apiserver-amd64/
提交为空,但是存在尚未跟踪的文件(使用 "git add" 建立跟踪)
yinbodotcc@yay:~/gitproject/fork8sinstall$ git commit -m "add Dockerfile:kubernetes-apiserver-amd64:v1.9.0"
[master (根提交) e12aa92] add Dockerfile:kubernetes-apiserver-amd64:v1.9.0
1 file changed, 3 insertions(+)
create mode 100644 kube-apiserver-amd64/Dockerfile
yinbodotcc@yay:~/gitproject/fork8sinstall$ git push origin master
Username for 'https://github.com': yinbodotcc
Password for 'https://yinbodotcc@github.com':
对象计数中: 4, 完成.
Delta compression using up to 4 threads.
压缩对象中: 100% (2/2), 完成.
写入对象中: 100% (4/4), 376 bytes | 376.00 KiB/s, 完成.
Total 4 (delta 0), reused 0 (delta 0)
To https://github.com/yinbodotcc/fork8sinstall.git
* [new branch] master -> master
yinbodotcc@yay:~/gitproject/fork8sinstall$
//注意,我发现上面Dockerfile文件位置放错了,下面纠正一下
yinbodotcc@yay:~/gitproject/fork8sinstall/kube-apiserver-amd64$ cp Dockerfile ..yinbodotcc@yay:~/gitproject/fork8sinstall/kube-apiserver-amd64$ cd ..
yinbodotcc@yay:~/gitproject/fork8sinstall$ dir
Dockerfile kube-apiserver-amd64
yinbodotcc@yay:~/gitproject/fork8sinstall$ git add .
yinbodotcc@yay:~/gitproject/fork8sinstall$ git status
位于分支 master
您的分支与上游分支 'origin/master' 一致。
要提交的变更:
(使用 "git reset HEAD <文件>..." 以取消暂存)
新文件: Dockerfile
yinbodotcc@yay:~/gitproject/fork8sinstall$ git commit -m "把Dockerfile移动到这里来"
[master 7525355] 把Dockerfile移动到这里来
yinbodotcc@yay:~/gitproject/fork8sinstall$ git push origin master
Username for 'https://github.com': yinbodotcc
Password for 'https://yinbodotcc@github.com':
对象计数中: 2, 完成.
Delta compression using up to 4 threads.
压缩对象中: 100% (2/2), 完成.
写入对象中: 100% (2/2), 316 bytes | 316.00 KiB/s, 完成.
Total 2 (delta 0), reused 0 (delta 0)
To https://github.com/yinbodotcc/fork8sinstall.git
1f363fc..7525355 master -> master
yinbodotcc@yay:~/gitproject/fork8sinstall$
Dockerfile文件内容如下:
FROM gcr.io/google_containers/kubernetes-apiserver-amd64:v1.9.0
MAINTAINER yay