$ git branch
* master
moma
whitney 2.Kay wasn't sure where she wanted to host the party, so you made several Git branches to explore different locations.
Some of the branches are no longer needed. Delete the following branches:
moma
whitney
You'll need the -D
option, because these feature branches were never merged into master
:
git branch -D branchname
$ git branch -d moma
error: The branch 'moma' is not fully merged.
If you are sure you want to delete it, run 'git
branch -D moma'.
$ git branch -D moma
Deleted branch moma (was 978e5a1).
$ git branch -D whitney
Deleted branch whitney (was 9b384f9).3.Kay
wants to see a version of the webpage that includes an unordered list
with bullet points instead of a paragraph to show information about the
party.
Create a new branch called
unordered-list
and switch over to it.
$ git branch unordered-list
$ git checkout unordered-list
Switched to branch 'unordered-list'4.In index.html, replace part of the content. 5.Add index.html to the staging area.
$ git add index.html
6.Now make a commit.
$ git commit -m "commit on unordered-list"
[unordered-list 5eddaeb] commit on unordered-list
1 file changed, 7 insertions(+), 1 deletion(-)
7.Kay approves the changes you made in the unordered-list
branch.
Switch over to
master
. Then, merge unordered-list
into master
. This will be a fast forward merge.
$ git checkout master
Switched to branch 'master'
$ git merge unordered-list
Updating 1481f5a..5eddaeb
Fast-forward
index.html | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
8.Kay wants the heading to be way bigger. Create a new branch called big-heading
. $ git branch big-heading
9.Now, switch over the the
big-heading
branch.To make the heading bigger, replace the line with something else.
$ git checkout big-heading
Switched to branch 'big-heading'10.Add index.html to the staging area.$ git add index.html
11.Make a commit.
$ git commit -m "Big heading"
[big-heading bbf14a7] Big heading
1 file changed, 1 insertion(+), 1 deletion(-)
12.Kay approves of the giant heading! Switch back over to the
master
branch. Then, merge big-heading
into master
.
$ git checkout master
Switched to branch 'master'
$ git merge big-heading
Updating 5eddaeb..bbf14a7
Fast-forward
index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
No comments :
Post a Comment