一,
修改 .git/config 文件
二,
git初始化:
git init
git remote add origin <url>
git fetch origin
git checkout master
git config --global credential.helper store(‘cache –timeout=3600’)//永久/临时
git config --global user.name "ASxx"
git config --global user.email "123456789@qq.com"
撤销本地分支与远程分支映射关系:
git branch --unset-upstream
查看当前本地分支与远程分支的映射关系:
git branch -vv
建立当前分支与远程分支的映射关系:
git branch -u origin/远程分支名
或
git branch --set-upstream-to origin/远程分支名
拉取远程分支并创建本地分支:
git checkout -b 本地分支名x origin/远程分支名x
或
git fetch origin 远程分支名x:本地分支名x
查看所有远程分支:
git branch -r
创建本地分支,并切换到分支:
git branch 分支名
引入子模块:
git submodule add 远程地址 本地文件目录
git submodule init
git submodule update
查看远程地址信息
git remote -v
修改远程地址
git remote set-url origin [url]
或
git remote rm origin
git remote add origin [url]
删除本地分支
git branch -d 分支名
删除远程分支
git push origin --delete 远程分支名
创建远程分支
git push origin 远程分支名
合并分支
git merge 远程分支名