git拷贝项目
git config --global user.name "xxx"
git config --global user.email "xxx@xx.cn"
git init myjob
cd myjob/
git clone xxx.git myjob
git创建分支并切换
git checkout -b debug
或
git branch debug
git checkout debug
git查看分支
git branch
git 合并分支
git merge debug
git 删除分支
git branch -d debug
git合并后保存分支信息
git merge --no--ff -m "debug分支 禁用FastForward" debug
git保存当前工作分支
git stash
git恢复当前分支
git stashlist(查看分支恢复区)
git stash apply
git stash drop
或
git stash pop
git 强制删除分支
git config --global user.name "xxx"
git config --global user.email "xxx@xx.cn"
git init myjob
cd myjob/
git clone xxx.git myjob
git创建分支并切换
git checkout -b debug
或
git branch debug
git checkout debug
git查看分支
git branch
git 合并分支
git merge debug
git 删除分支
git branch -d debug
git合并后保存分支信息
git merge --no--ff -m "debug分支 禁用FastForward" debug
git保存当前工作分支
git stash
git恢复当前分支
git stashlist(查看分支恢复区)
git stash apply
git stash drop
或
git stash pop
git 强制删除分支
git branch -D debu
git推送分支(本地分支,服务器上是不知道的)
git remote
git push origin debug
git checkout -b debug origin/debug(切换到远程的debug分支上进行开发)
(冲突时 先把最新提交从服务器上抓取下来)再git push 提交
git branch --set-upstream debug origin/debug
git pull