简易的命令行入门教程:

Git 全局设置:

1
2
git config --global user.name "保修三年"
git config --global user.email "865832@qq.com"

创建 git 仓库:

1
2
3
4
5
6
7
8
mkdir dream-java
cd dream-java
git init
touch README.md
git add README.md
git commit -m "first commit"
git remote add origin https://gitee.com/dongdonging/dream-java.git
git push -u origin "master"

已有仓库?

1
2
3
cd existing_git_repo
git remote add origin https://gitee.com/dongdonging/dream-java.git
git push -u origin "master"