Answered step by step
Verified Expert Solution
Link Copied!

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 1, under master branchgit
a. Open GitBash or VS Code over your personal project folder e.g \Lab3\MyApp
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 3 to ToDoApp.py and then repeat step e, f (You may try
command 7 in appendix 1 to combine step e and f, command 7 is very handy)
Task 2, 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 delete_task() method and use Timeline in VS Code to view the difference
d. Repeat Task 1s step e,f
e. Use command git checkout master to switch back to master branch
Task 3, 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 sort_todo_list() method
d. Repeat Task 1s step e,f
e. Use git checkout master to switch back to master branch
Task 4, 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 delete_task() and sort_todo_list() method
d. Repeat Task 1s step e,f
e. Use git checkout master to switch back to master branch Task 5, 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 1s step e,f to commit the final version
e. Run command gitk to show branch graph Appendix 1 Common Git commands
1. Git config --global user.name Your Name
2. Git config --global user.email Your email address
3. Git init //Initialize a local Git repository
4. Git status //Check status
5. Git add . or git add A //Add all new and changed files to the staging
6. Git commit m message//Commit change
7. Git commit a m message//commands 5 and 6 in combined, much
more handy
8. Touch filename //create a new untracked file
9. Git diff //preview changes
10. Git difftool --tool=winmerge //use Winmerge to view changes.
11. Git branch BranchName //Create a new branch
12. Git checkout BranchName //Switch to a branch
13. Git checkout -//Switch to the branch last checked out
14. Git merge BranchName m message//Merge a branch into the active branch
15. gitk //Open git repository browser
16. Git log oneline //display commit history
17. 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books

Students also viewed these Databases questions