zoukankan      html  css  js  c++  java
  • Git简易的命令行入门教程

    Git 全局设置:

    git config --global user.name "imsoft"
    git config --global user.email "imsoft@qq.com"

    创建 git 仓库:

    mkdir imsoft.github.io
    cd imsoft.github.io
    git init
    touch README.md
    git add README.md
    git commit -m "first commit"
    git remote add origin https://git.oschina.net/imsoft/imsoft.github.io.git
    git push -u origin master

    已有项目?

    cd existing_git_repo
    git remote add origin https://git.oschina.net/imsoft/imsoft.github.io.git
    git push -u origin master



    一次完整本地代码推送远程仓库流程

    ①创建远程仓库(github/gitee/coding),复制项目地址,
      如:https://git.oschina.net/imsoft/imsoft.github.io.git
    ②本地进入项目存放目录,
      使用git clone https://git.oschina.net/imsoft/imsoft.github.io.git,做项目初始化
    ③将代码放入项目目录,使用git add . ,添加所有更新;
      使用git commit -m "备注的信息",添加备注;
      使用git push -u origin master 推送代码。
  • 相关阅读:
    OCP-1Z0-053-V12.02-315题
    OCP-1Z0-053-V12.02-272题
    OCP-1Z0-053-V12.02-152题
    OCP-1Z0-053-V12.02-78题
    OCP-1Z0-053-V12.02-593题
    OCP-1Z0-053-V12.02-505题
    JavaScript中字符串和数字
    OCP-1Z0-053-V12.02-360题
    OCP-1Z0-053-V12.02-213题
    OCP-1Z0-053-V12.02-598题
  • 原文地址:https://www.cnblogs.com/imsoft/p/5507228.html
Copyright © 2011-2022 走看看