git上传本地代码

来源:互联网 发布:plc模拟编程手机版 编辑:程序博客网 时间:2024/06/04 18:19

首先用Git Bash cd到你项目本地地址
基本命令:
1.git init 建立git仓库
2.git add . 将项目的所有文件添加到仓库中,如果想添加某个特定的文件,只需把.换成特定的文件名即可
3.git commit -m “注释” 将add的文件commit到仓库
4.git remote add origin “github仓库远程地址” github上创建自己的Repository,将本地的仓库关联到github上
5.git commit
6.git pull origin master 上传github之前,要先pull
7.git push -u origin master 上传代码到github远程仓库

上传过程中间可能会让你输入Username和Password,只要输入github的账号和密码就好

原创粉丝点击