From c636adb18c6bef814e067ba2641cdb6b96426949 Mon Sep 17 00:00:00 2001 From: Fariha Mehzabin <48123115+FarihaMehzabin@users.noreply.github.com> Date: Fri, 2 Dec 2022 14:46:55 +0600 Subject: [PATCH] Update day2.md Hey I added another comment which I found useful. You can switch to a branch and name it simultaneously. --- Days/day2.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Days/day2.md b/Days/day2.md index b0b5f42..09101dd 100755 --- a/Days/day2.md +++ b/Days/day2.md @@ -3,9 +3,10 @@ On the second day, I learned the following things about Git. - `git branch` will show the list of branches of Git. Branch is created to divide the data functionalities or use cases. - `git branch branchname` will create a new branch. - `git checkout branchname` will help you switch to another branch. +- `git checkout -b branchname` will create a new branch and switch to that branch too. - `git rebase -i hash value` will merge multiple commits into a single commit. - `git merge branchname` will merge the branch into another. Here the name of the branch would a branch that you want to merge into another branch. ## **Explaining it in a video** -Here you can get an explanation in a video. [2/60 Day of DevOps Challenge]() \ No newline at end of file +Here you can get an explanation in a video. [2/60 Day of DevOps Challenge]()