Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Task 1 , under master branchgit a . Open GitBash or VS Code over your personal project folder e . g Lab 3
Task under master branchgit
a Open GitBash or VS Code over your personal project folder eg LabMyApp
b Add your contacts using git config global user.name your name and git config
global user.email your email and use git config list command to verify your contact
c Add a local repository by using git init and constantly use git status to check status in
this step and future steps
d Use command touch ToDoApp.py to create a java file in project folder
e Use command git add A to add all file in the directory to staging phase
f Use command git commit m put a reasonable message to commit the files and use
git log to shows what happened.
g Copy initial code in appendix to ToDoApp.py and then repeat step e f You may try
command in appendix to combine step e and f command is very handy
Task under model branch
a Use command Git Branch model to create a branch model
b Use command git checkout model to switch to this branch
c Uncomment deletetask method and use Timeline in VS Code to view the difference
d Repeat Task s step ef
e Use command git checkout master to switch back to master branch
Task under view branch
a Under Master branch, use Git Branch view to create a branch view
b Use git checkout view to switch to this branch
c Uncomment sorttodolist method
d Repeat Task s step ef
e Use git checkout master to switch back to master branch
Task under controller branch
a Under Master branch, use Git Branch controller to create a branch view
b Use git checkout controller to switch to this branch
c Uncomment deletetask and sorttodolist method
d Repeat Task s step ef
e Use git checkout master to switch back to master branch Task Merge branches model, view and controller into master
a Under Master branch, Use command git merge model m Some message here to merge model branch to master
b Use command git merge view m Some message here to merge view branch to master
c Use command git merge controller m Some message here to merge controller branch to master
d Check merged file to clean any conflict then repeat Task s step ef to commit the final version
e Run command gitk to show branch graph Appendix Common Git commands
Git config global user.name Your Name
Git config global user.email Your email address
Git init Initialize a local Git repository
Git status Check status
Git add or git add A Add all new and changed files to the staging
Git commit m messageCommit change
Git commit a m messagecommands and in combined, much
more handy
Touch filename create a new untracked file
Git diff preview changes
Git difftool toolwinmerge use Winmerge to view changes.
Git branch BranchName Create a new branch
Git checkout BranchName Switch to a branch
Git checkout Switch to the branch last checked out
Git merge BranchName m messageMerge a branch into the active branch
gitk Open git repository browser
Git log oneline display commit history
Git reset or git revert ways to go back to previous commit
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started