github 提交代码方法

来源:互联网 发布:java 仪表盘 编辑:程序博客网 时间:2024/05/17 11:03


1.如上图,在github项目中,选择Clone or download,就会弹出项目clone地址
2.复制clone地址,利用git clone,下载到本地:
git clone https://github.com/CloudHackathon/your-eyes.git
F:\YourEyes\github Test                                                 
λ git clone https://github.com/CloudHackathon/your-eyes.git             
Cloning into 'your-eyes'...                                             
remote: Counting objects: 403, done.                                    
remote: Compressing objects: 100% (277/277), done.                      
rRemote: Total 403 (delta 171), reused 342 (delta 115), pack-reused 0   
Receiving objects:  83% (335/403), 3.71 MiB | 2.30                      
Receiving objects: 100% (403/403), 5.40 MiB | 2.30 MiB/s, done.         
Resolving deltas: 100% (171/171), done.                                 
Checking connectivity... done.          
                               
3.修改项目代码,cd 到下载目录,利用git add -A 添加所有修改文件:
git add -A 
4.提交代码更新,添加注释
 git commit -m "comment"
[master a65743d] comment
 1 file changed, 1 insertion(+)

5.提交到远程仓库
git push -u origin master

输入账号和密码即可完成代码提交
6.github上查看代码更新是否正常。
0 0
原创粉丝点击