git
git init:创建一个含有工作区的仓库
git init --bare:创建一个初始化的仓库,这个仓库没有工作区,通常用于服务器端
git clone url [destdir]
git add file
git status
git commit -m "message"
git reset --hard hash|HEAD^:回退本地仓库,工作区,Index
--soft :回退本地仓库
HAED:当前指针
git checkout -- file 检出文件
git checkout branchname
git branch newbrnach
git branch -d branch
git rm file
git cherry-pick hash:检出到当前分支
git pull url
git merge
git log --oneline
git log -n n:
git diff :工作区和Index
git diff --[staged|cached]:本地仓库和index
git
Repo
repo init url
repo sync -c -d:同步当前分支当前目录
repo sync dir:同步指定目录