Git:将修改后的代码提交到仓库

1.常用命令

    1. git add .                             (git add -u 暂存已修改过的)
    2. git commit -m ‘xxxxxxx’        提交,说明信息
    3. git push -u origin 分支名           推送
    4. git checkout -b 分支名          (创建分支并且转换分支)
    5. 克隆指定的分支:git clone -b 分支名  仓库地址
    6. git clone ‘xxxxxxxxxxx’            克隆
    7. git pull                                     同步本分支最新的代码
    8. git merge    分支1                    将分支1与本分支合并        

2.修改代码后,上传提交自己的分支到仓库步骤如下:

        (1)修改后git init----> git add--->git commit -m 'xxxxxx'--->git push 'xxxxxxx' 分支名

你可能感兴趣的:(Git,git)