常用命令
git config --list
git ls-files
git ls-tree head
git ls-files -s
git log
git log --oneline
git log --graph
git pull
git fetch
git pull <远程主机名> <远程分支名>:<本地分支名>
git fetch <远程主机名> <远程分支名>:<本地分支名>
git push
git add <filePath>
git add .
git commit -m "<message>"
git merge dev
git rm -r -n runtime/*
git rm -r runtime/*
git rm -r --cached runtime/*
git checkout -- <filePathName>
git config --global user.name "Jalena"
git config --global user.email "jalena@bcsytv.com"
git config <key>
git config --global core.autocrlf true
git reset --soft 版本号
git reset head 文件
git check out 文件
git reset --mix 版本号
git check out 文件
git reset --hard 版本号
远程仓库相关命令
git init
git clone https://github.com/odoo/odoo.git
git remote -v
git remote add [name] [url]
git remote rm [name]
git remote set-url --push [name] [newUrl]
git pull [remoteName] [localBranchName]
git push [remoteName] [localBranchName]
分支(branch)操作相关命令
git branch
git branch -r
git branch [name] // 注意新分支创建后不会自动切换为当前分支
git checkout [name]
git checkout -b [name]
git branch -d [name]
git push origin [name]
git push origin heads/[name]
git push origin [name]
子模块(submodule)相关操作命令
git submodule add [url] -b <version> [path]
git submodule init
git submodule update
git rm --cached [path]
Git Flow
文章评论