Git创建与简单使用

一、 服务器端
  创建空的仓库(以项目tm201为例)
  1. git账户登录
  2. 新建仓库目录 mkdir tm101.git && cd tm201.git
  3. git初始化新的空的仓库 git --bare init
二、 客户端
  客户端从服务器把clone空的仓库到本地
  1. clone空的仓库:git clone git@10.1.1.119:/home/git/tm201.git
  2. 拷贝源代码alps到tm201目录下
  3. git add alps
  4. git commit –m “init tm201 version, base tm100” alps
  5. git push origin master
  

原文地址:https://www.cnblogs.com/liujinyu/p/3460742.html