Git course 19th part lab question
Asked by Fuzail Kazi about a year ago
0
I'm finding it difficult to solve the challenge can anyone help me with the solution.
1 Answer
- First create numbers.txt file
- Initialize the git using
git init
- Add the numbers.txt file by writing
git add .
- Now write
git commit -m " initial commit"
- Now our
master
branch is created. - Write
git branch branch1
to create branch1 - But we will still be on the master branch to change from master branch to branch1
- write
git checkout branch1
, then you will get message like "Swtiched to 'branch1' " - While you are on branch1 change the number.txt file content as per the lab.
- Now follow the same step to create branch2, branch3 & surprise branch.
1
Hello Fuzail, below I have mentioned the step to follow to pass the lab.
Do like this,
you need to add and commit while creating the branch for the first time.
show more answers
Your answer