桂城网站设计,做网站怎样和客户沟通,wordpress只有vip会员下载,网站首页标题设置在使用git的过程中#xff0c;因为人为因素造成分支#xff08;commit)被删除#xff0c;可以使用以下步骤进行恢复。 
首先用以下步骤创建一个新分支#xff0c;修改一些文件后删除#xff0c;以便进行恢复。 1.创建分支 abc 
git branch abc2.查看分支列表 
git branch …在使用git的过程中因为人为因素造成分支commit)被删除可以使用以下步骤进行恢复。 
首先用以下步骤创建一个新分支修改一些文件后删除以便进行恢复。 1.创建分支 abc 
git branch abc2.查看分支列表 
git branch -aabc
* developremotes/origin-dev/develop3.切换到abc分支随便修改一下东西后 commit 
切换分支
git checkout abc
Switched to branch abc创建一个文件
echo abc  test.txtcommit
git add .
git commit -m add test.txt
[abc 3eac14d] add test.txt1 file changed, 1 insertion()create mode 100644 test.txt4.删除分支abc 
git branch -D abc
Deleted branch abc (was 3eac14d).5.查看分支列表abc分支已不存在 
git branch -a
* developremotes/origin-dev/develop恢复步骤如下 1.使用git log -g 找回之前提交的commit 
commit 3eac14d05bc1264cda54a7c21f04c3892f32406a
Reflog: HEAD{1} (fdipzone fdipzonesina.com)
Reflog message: commit: add test.txt
Author: fdipzone fdipzonesina.com
Date:   Sun Jan 31 22:26:33 2016 0800
add test.txt2.使用git branch recover_branch[新分支] commit_id命令用这个commit创建一个分支 
git branch recover_branch_abc 3eac14d05bc1264cda54a7c21f04c3892f32406agit branch -a
* developrecover_branch_abcremotes/origin-dev/develop可以见到recover_branch_abc已创建 
3.切换到recover_branch_abc分支检查文件是否存在 
git checkout recover_branch_abc
Switched to branch recover_branch_abc
ls -lt
total 8
-rw-r--r--   1 fdipzone  staff     4  1 31 22:38 test.txt这样就可以恢复被误删的分支了