天天看點

git常用指令彙總

指令行指令

Git 全局設定
git config --global user.name "cqu2003"
git config --global user.email "[email protected]"
      
建立新版本庫
git clone [email protected]:cqu2003/demo.git
cd demo
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master
      
已存在的檔案夾或 Git 倉庫
cd existing_folder
git init
git remote add origin [email protected]:cqu2003/demo.git
git add .
git commit
git push -u origin master