Git 如何初始化项目

A simple command-line tutorial:

Git global settings:

1
2
git config --global user.name "your user name"
git config --global user.email "your email"

Create git repository:

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

Existing project?

1
2
3
cd existing_git_repo
git remote add origin https://gitee.com/username/you-git-url.git
git push -u origin master

坚持原创及高品质技术分享,您的支持将鼓励我继续创作!