$ git config --global user.name "Your Name" $ git config --global user.email "email@example.com"
$ git remote add origin https://XXXX
$ git init
git add filename
git commit -m "comment message"
添加新内容
git add
git status
git commit -m‘add something’ (add something为备注)
git push
删除文件(文件夹)
git rm Date -r -f
git commit -m'delete something'(delete somgthing 备注)
git push
branch
git branch
git branch new
git push origin new
git checkout new
git branch -d new
git branch -r -d origin/new
git push origin :new
clone 分支
git clone -b develop https://git.XXX.git
git add -A = git add . + git add -u
git add -A
stages Allgit add .
stages new and modified, without deletedgit add -u
stages modified and deleted, without new
git reset --hard FETCH_HEAD
git pull
Error:
You are not currently on a branch.
git checkout -b temp
git checkout master
git pull