https://www.lintcode.com/problem/2540/
输入命令,按回车键执行
+--------------- 任务进度 1 / 3 ----------------+
新建分支
将本地的git repo里新建出一个叫做 new-branch 的分支
+----------------------------------------------+
#@Lintcodein/nobody[13:55:58]
$
cd my-repo
#@Lintcodein/nobody/my-repo[13:56:39]
$
git checkout -b new-branch
<--恭喜您,阶段任务已完成,新任务如下-->
+--------------- 任务进度 2 / 3 ----------------+
新建文件
新建一个 new-file.txt
+----------------------------------------------+
#@Lintcodein/nobody/my-repo[13:57:45]
$
touch new-file.txt
<--恭喜您,阶段任务已完成,新任务如下-->
+--------------- 任务进度 3 / 3 ----------------+
创建commit
在这个分支上将新建的文件 commit 上去
+----------------------------------------------+
#@Lintcodein/nobody/my-repo[13:58:27]
$
git add new-file.txt
#@Lintcodein/nobody/my-repo[13:58:53]
$
git commit -m "Add new file"
[new-branch 1b77495] Add new file
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 new-file.txt
<--恭喜您,此题目已通过。-->