Git 全局设置:

git config --global user.name "imsoft"
git config --global user.email "[email protected]"

创建 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 推送代码。
04-28 01:00