Git course 19th part lab question

Asked by Fuzail Kazi about a year ago


I'm finding it difficult to solve the challenge can anyone help me with the solution.

1 Answer


    Hello Fuzail, below I have mentioned the step to follow to pass the lab.

    Do like this,

    1. First create numbers.txt file
    2. Initialize the git using git init
    3. Add the numbers.txt file by writing git add .
    4. Now write git commit -m " initial commit"
    5. Now our master branch is created.
    6. Write git branch branch1 to create branch1
    7. But we will still be on the master branch to change from master branch to branch1
    8. write git checkout branch1, then you will get message like "Swtiched to 'branch1' "
    9. While you are on branch1 change the number.txt file content as per the lab.
    10. Now follow the same step to create branch2, branch3 & surprise branch.

    you need to add and commit while creating the branch for the first time.

Your answer