Skip to Content
Git Branching
commit on a new branch

Congratulations! You have switched to a new branch. All the commands you do on master, you can also do on this branch.

For example, to add files to the staging area, use:

git add filename

And to commit, use:

git commit -m "Commit message"

In a moment, you will make a commit on the fencing branch. On the far right, the diagram shows what will happen to the Git project.



Print the Git commit log.

Notice the output:

  • The commits you see were all made in the master branch. fencing inherited them.
  • This means that every commit master has, fencing also has.

Note: if you find that your cursor is stuck in Git log, press q to escape.


In resume.txt, replace your skill at scheming against Hook with your experience in sword-fights.

Delete this line:

-Scheme against Captain Hook

and type this line in its place:

-Engage in swordfights with pirates

Add resume.txt into the staging area.


Commit the changes to the repository with a commit message.

Folder Icon

Sign up to start coding

Already have an account?