登录github, 在主页上点击 Create a Repository
输入名字Repository Name test1. 选择 ignore文件类型。
然后点击 Create repository
选择 http 协议:
将远程的工程拷贝到本地:
sina@ubuntu:~/work/rootkit$ git clone https://github.com/xushichao/test1.git Cloning into test1... remote: Counting objects: 4, done. remote: Compressing objects: 100% (3/3), done. remote: Total 4 (delta 0), reused 0 (delta 0) Unpacking objects: 100% (4/4), done.
添加文件:
sina@ubuntu:~/work/rootkit/test1$ touch main.c sina@ubuntu:~/work/rootkit/test1$ ls main.c README.md sina@ubuntu:~/work/rootkit/test1$ git add main.c sina@ubuntu:~/work/rootkit/test1$ git commit -m "add code" [master 5600225] add code 0 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 main.c文件或者文件列表可以作为 git add 的参数。 git commit 创建一个提交记录。
添加新的远程版本库:
sina@ubuntu:~/work/rootkit/test$ git branch * master sina@ubuntu:~/work/rootkit/test$ git remote add origin https://github.com/xushichao/test1.git sina@ubuntu:~/work/rootkit/test1$ git push origin master Username: Password: Counting objects: 4, done. Delta compression using up to 4 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/xushichao/test1.git f2a4db4..5600225 master -> master
关于删除github 上的项目,没有什么技术含量,只要找到位置了就行了。可见如下链接:
jingyan.baidu.com/article/63acb44ae77d2961fcc17ede.html