git上創建項目及命令初始化項目操作

命令操作介紹


Git global 設置
git config --global user.name "user_name"
git config --global user.email "[email protected]"

創建新倉庫
git clone [email protected]:group_name/project_name.git
cd project
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master

本地已有的項目目錄
cd existing_folder
git init
git remote add origin 
git add .
git commit -m "Initial commit"
git push -u origin master

本地已存在 Git 倉庫
cd existing_repo
git remote add origin 
git push -u origin --all
git push -u origin --tags
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章