Git入门常用命令

2026-04-10 15:17:56

1、Git global setup

git config --global user.name "XXX"

git config --global user.email "XXX@XXX.com"

2、Create a new repository

git clone git@XXX/test.git

cd test

touch README.md

git add README.md

git commit -m "add README"

git push -u origin master

3、Existing folder or Git repository

cd existing_folder

git init

git remote add origin git@XXX/test.git

git add .

git commit

git push -u origin master

相关推荐
  • 阅读量:169
  • 阅读量:188
  • 阅读量:39
  • 阅读量:91
  • 阅读量:122
  • 猜你喜欢